syntax = "proto3"; package cmvr.management; // Independent process. This service remains available while cmvr_es is stopped. service ManagerService { rpc GetStatus(Empty) returns (ProcessStatus); rpc ListConfigs(Empty) returns (ConfigList); rpc ReadConfig(ConfigPath) returns (ConfigFile); rpc ValidateConfig(ConfigFile) returns (Validation); rpc WriteConfig(ConfigFile) returns (ConfigFile); rpc Control(ProcessRequest) returns (ProcessStatus); } message Empty {} message ProcessStatus { bool running = 1; int64 pid = 2; bool managed = 3; string executable = 4; string working_directory = 5; string detail = 6; int32 last_exit_code = 7; } message ConfigPath { string path = 1; } message ConfigList { repeated string paths = 1; } message ConfigFile { string path = 1; string text = 2; // Opaque revision returned by ReadConfig; required for optimistic writes. string revision = 3; } message Validation { bool valid = 1; string detail = 2; } message ProcessRequest { enum Action { UNSPECIFIED = 0; START = 1; STOP = 2; RESTART = 3; } Action action = 1; }