github.com/microsoft/moc@v0.17.1/rpc/cloudagent/cloud/controlplane/moc_cloudagent_controlplane.proto (about) 1 // Copyright (c) Microsoft Corporation. 2 // Licensed under the Apache v2.0 license. 3 4 syntax = "proto3"; 5 option go_package = "github.com/microsoft/moc/rpc/cloudagent/cloud"; 6 package moc.cloudagent.controlplane; 7 8 import "google/protobuf/wrappers.proto"; 9 import "moc_common_common.proto"; 10 11 message ControlPlaneRequest { 12 repeated ControlPlane ControlPlanes = 1; 13 Operation OperationType = 2; 14 } 15 16 message ControlPlaneResponse { 17 repeated ControlPlane ControlPlanes = 1; 18 google.protobuf.BoolValue Result = 2; 19 string Error = 3; 20 } 21 22 enum ControlPlaneState { 23 NotLeader = 0; 24 Leader = 1; 25 } 26 27 // There is a ControlPlane entity for every CloudAgent 28 // participating to provide high availability without 29 // FailoverCluster 30 message ControlPlane { 31 // id is an internal value required for all entities 32 string id = 1; 33 // name is an identifier provided during ControlPlane creation 34 string name = 2; 35 // locationName is the name of the Location entity this ControlPlane belongs to 36 string locationName = 3; 37 // fqdn is the fqdn, hostname, or ip address that this ControlPlane will use as part of the leadership election 38 string fqdn = 4; 39 // port is the port that this ControlPlane will use as part of the leadership election 40 int32 port = 5; 41 // status is a standard entity status 42 Status status = 6; 43 // state stores the last known election status of this ControlPlane 44 ControlPlaneState state = 7; 45 } 46 47 service ControlPlaneAgent { 48 rpc Invoke(ControlPlaneRequest) returns (ControlPlaneResponse) {} 49 } 50