github.com/muhammadn/cortex@v1.9.1-0.20220510110439-46bb7000d03d/pkg/alertmanager/alertmanagerpb/alertmanager.proto (about) 1 syntax = "proto3"; 2 3 package alertmanagerpb; 4 import "gogoproto/gogo.proto"; 5 6 option go_package = "alertmanagerpb"; 7 8 import "github.com/weaveworks/common/httpgrpc/httpgrpc.proto"; 9 import "github.com/prometheus/alertmanager/cluster/clusterpb/cluster.proto"; 10 11 // Alertmanager interface exposed to the Alertmanager Distributor and other Alertmanagers 12 service Alertmanager { 13 rpc HandleRequest(httpgrpc.HTTPRequest) returns(httpgrpc.HTTPResponse) {}; 14 rpc UpdateState(clusterpb.Part) returns (UpdateStateResponse) {}; 15 rpc ReadState(ReadStateRequest) returns (ReadStateResponse) {}; 16 } 17 enum UpdateStateStatus { 18 OK = 0; 19 MERGE_ERROR = 2; 20 USER_NOT_FOUND = 3; 21 } 22 23 message UpdateStateResponse { 24 UpdateStateStatus status = 1; 25 string error = 2; 26 } 27 28 message ReadStateRequest { 29 } 30 31 enum ReadStateStatus { 32 READ_UNSPECIFIED = 0; 33 READ_OK = 1; 34 READ_ERROR = 2; 35 READ_USER_NOT_FOUND = 3; 36 } 37 38 message ReadStateResponse { 39 // Alertmanager (clusterpb) types do not have Equal methods. 40 option (gogoproto.equal) = false; 41 42 ReadStateStatus status = 1; 43 string error = 2; 44 clusterpb.FullState state = 3; 45 } 46