github.com/microsoft/moc@v0.17.1/rpc/cloudagent/cloud/moc_cloudagent_controlplane.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: moc_cloudagent_controlplane.proto 3 4 package cloud 5 6 import ( 7 context "context" 8 fmt "fmt" 9 proto "github.com/golang/protobuf/proto" 10 wrappers "github.com/golang/protobuf/ptypes/wrappers" 11 common "github.com/microsoft/moc/rpc/common" 12 grpc "google.golang.org/grpc" 13 codes "google.golang.org/grpc/codes" 14 status "google.golang.org/grpc/status" 15 math "math" 16 ) 17 18 // Reference imports to suppress errors if they are not otherwise used. 19 var _ = proto.Marshal 20 var _ = fmt.Errorf 21 var _ = math.Inf 22 23 // This is a compile-time assertion to ensure that this generated file 24 // is compatible with the proto package it is being compiled against. 25 // A compilation error at this line likely means your copy of the 26 // proto package needs to be updated. 27 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 28 29 type ControlPlaneState int32 30 31 const ( 32 ControlPlaneState_NotLeader ControlPlaneState = 0 33 ControlPlaneState_Leader ControlPlaneState = 1 34 ) 35 36 var ControlPlaneState_name = map[int32]string{ 37 0: "NotLeader", 38 1: "Leader", 39 } 40 41 var ControlPlaneState_value = map[string]int32{ 42 "NotLeader": 0, 43 "Leader": 1, 44 } 45 46 func (x ControlPlaneState) String() string { 47 return proto.EnumName(ControlPlaneState_name, int32(x)) 48 } 49 50 func (ControlPlaneState) EnumDescriptor() ([]byte, []int) { 51 return fileDescriptor_690e71c673ae0745, []int{0} 52 } 53 54 type ControlPlaneRequest struct { 55 ControlPlanes []*ControlPlane `protobuf:"bytes,1,rep,name=ControlPlanes,proto3" json:"ControlPlanes,omitempty"` 56 OperationType common.Operation `protobuf:"varint,2,opt,name=OperationType,proto3,enum=moc.Operation" json:"OperationType,omitempty"` 57 XXX_NoUnkeyedLiteral struct{} `json:"-"` 58 XXX_unrecognized []byte `json:"-"` 59 XXX_sizecache int32 `json:"-"` 60 } 61 62 func (m *ControlPlaneRequest) Reset() { *m = ControlPlaneRequest{} } 63 func (m *ControlPlaneRequest) String() string { return proto.CompactTextString(m) } 64 func (*ControlPlaneRequest) ProtoMessage() {} 65 func (*ControlPlaneRequest) Descriptor() ([]byte, []int) { 66 return fileDescriptor_690e71c673ae0745, []int{0} 67 } 68 69 func (m *ControlPlaneRequest) XXX_Unmarshal(b []byte) error { 70 return xxx_messageInfo_ControlPlaneRequest.Unmarshal(m, b) 71 } 72 func (m *ControlPlaneRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 73 return xxx_messageInfo_ControlPlaneRequest.Marshal(b, m, deterministic) 74 } 75 func (m *ControlPlaneRequest) XXX_Merge(src proto.Message) { 76 xxx_messageInfo_ControlPlaneRequest.Merge(m, src) 77 } 78 func (m *ControlPlaneRequest) XXX_Size() int { 79 return xxx_messageInfo_ControlPlaneRequest.Size(m) 80 } 81 func (m *ControlPlaneRequest) XXX_DiscardUnknown() { 82 xxx_messageInfo_ControlPlaneRequest.DiscardUnknown(m) 83 } 84 85 var xxx_messageInfo_ControlPlaneRequest proto.InternalMessageInfo 86 87 func (m *ControlPlaneRequest) GetControlPlanes() []*ControlPlane { 88 if m != nil { 89 return m.ControlPlanes 90 } 91 return nil 92 } 93 94 func (m *ControlPlaneRequest) GetOperationType() common.Operation { 95 if m != nil { 96 return m.OperationType 97 } 98 return common.Operation_GET 99 } 100 101 type ControlPlaneResponse struct { 102 ControlPlanes []*ControlPlane `protobuf:"bytes,1,rep,name=ControlPlanes,proto3" json:"ControlPlanes,omitempty"` 103 Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"` 104 Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"` 105 XXX_NoUnkeyedLiteral struct{} `json:"-"` 106 XXX_unrecognized []byte `json:"-"` 107 XXX_sizecache int32 `json:"-"` 108 } 109 110 func (m *ControlPlaneResponse) Reset() { *m = ControlPlaneResponse{} } 111 func (m *ControlPlaneResponse) String() string { return proto.CompactTextString(m) } 112 func (*ControlPlaneResponse) ProtoMessage() {} 113 func (*ControlPlaneResponse) Descriptor() ([]byte, []int) { 114 return fileDescriptor_690e71c673ae0745, []int{1} 115 } 116 117 func (m *ControlPlaneResponse) XXX_Unmarshal(b []byte) error { 118 return xxx_messageInfo_ControlPlaneResponse.Unmarshal(m, b) 119 } 120 func (m *ControlPlaneResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 121 return xxx_messageInfo_ControlPlaneResponse.Marshal(b, m, deterministic) 122 } 123 func (m *ControlPlaneResponse) XXX_Merge(src proto.Message) { 124 xxx_messageInfo_ControlPlaneResponse.Merge(m, src) 125 } 126 func (m *ControlPlaneResponse) XXX_Size() int { 127 return xxx_messageInfo_ControlPlaneResponse.Size(m) 128 } 129 func (m *ControlPlaneResponse) XXX_DiscardUnknown() { 130 xxx_messageInfo_ControlPlaneResponse.DiscardUnknown(m) 131 } 132 133 var xxx_messageInfo_ControlPlaneResponse proto.InternalMessageInfo 134 135 func (m *ControlPlaneResponse) GetControlPlanes() []*ControlPlane { 136 if m != nil { 137 return m.ControlPlanes 138 } 139 return nil 140 } 141 142 func (m *ControlPlaneResponse) GetResult() *wrappers.BoolValue { 143 if m != nil { 144 return m.Result 145 } 146 return nil 147 } 148 149 func (m *ControlPlaneResponse) GetError() string { 150 if m != nil { 151 return m.Error 152 } 153 return "" 154 } 155 156 // There is a ControlPlane entity for every CloudAgent 157 // participating to provide high availability without 158 // FailoverCluster 159 type ControlPlane struct { 160 // id is an internal value required for all entities 161 Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 162 // name is an identifier provided during ControlPlane creation 163 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` 164 // locationName is the name of the Location entity this ControlPlane belongs to 165 LocationName string `protobuf:"bytes,3,opt,name=locationName,proto3" json:"locationName,omitempty"` 166 // fqdn is the fqdn, hostname, or ip address that this ControlPlane will use as part of the leadership election 167 Fqdn string `protobuf:"bytes,4,opt,name=fqdn,proto3" json:"fqdn,omitempty"` 168 // port is the port that this ControlPlane will use as part of the leadership election 169 Port int32 `protobuf:"varint,5,opt,name=port,proto3" json:"port,omitempty"` 170 // status is a standard entity status 171 Status *common.Status `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"` 172 // state stores the last known election status of this ControlPlane 173 State ControlPlaneState `protobuf:"varint,7,opt,name=state,proto3,enum=moc.cloudagent.controlplane.ControlPlaneState" json:"state,omitempty"` 174 XXX_NoUnkeyedLiteral struct{} `json:"-"` 175 XXX_unrecognized []byte `json:"-"` 176 XXX_sizecache int32 `json:"-"` 177 } 178 179 func (m *ControlPlane) Reset() { *m = ControlPlane{} } 180 func (m *ControlPlane) String() string { return proto.CompactTextString(m) } 181 func (*ControlPlane) ProtoMessage() {} 182 func (*ControlPlane) Descriptor() ([]byte, []int) { 183 return fileDescriptor_690e71c673ae0745, []int{2} 184 } 185 186 func (m *ControlPlane) XXX_Unmarshal(b []byte) error { 187 return xxx_messageInfo_ControlPlane.Unmarshal(m, b) 188 } 189 func (m *ControlPlane) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 190 return xxx_messageInfo_ControlPlane.Marshal(b, m, deterministic) 191 } 192 func (m *ControlPlane) XXX_Merge(src proto.Message) { 193 xxx_messageInfo_ControlPlane.Merge(m, src) 194 } 195 func (m *ControlPlane) XXX_Size() int { 196 return xxx_messageInfo_ControlPlane.Size(m) 197 } 198 func (m *ControlPlane) XXX_DiscardUnknown() { 199 xxx_messageInfo_ControlPlane.DiscardUnknown(m) 200 } 201 202 var xxx_messageInfo_ControlPlane proto.InternalMessageInfo 203 204 func (m *ControlPlane) GetId() string { 205 if m != nil { 206 return m.Id 207 } 208 return "" 209 } 210 211 func (m *ControlPlane) GetName() string { 212 if m != nil { 213 return m.Name 214 } 215 return "" 216 } 217 218 func (m *ControlPlane) GetLocationName() string { 219 if m != nil { 220 return m.LocationName 221 } 222 return "" 223 } 224 225 func (m *ControlPlane) GetFqdn() string { 226 if m != nil { 227 return m.Fqdn 228 } 229 return "" 230 } 231 232 func (m *ControlPlane) GetPort() int32 { 233 if m != nil { 234 return m.Port 235 } 236 return 0 237 } 238 239 func (m *ControlPlane) GetStatus() *common.Status { 240 if m != nil { 241 return m.Status 242 } 243 return nil 244 } 245 246 func (m *ControlPlane) GetState() ControlPlaneState { 247 if m != nil { 248 return m.State 249 } 250 return ControlPlaneState_NotLeader 251 } 252 253 func init() { 254 proto.RegisterEnum("moc.cloudagent.controlplane.ControlPlaneState", ControlPlaneState_name, ControlPlaneState_value) 255 proto.RegisterType((*ControlPlaneRequest)(nil), "moc.cloudagent.controlplane.ControlPlaneRequest") 256 proto.RegisterType((*ControlPlaneResponse)(nil), "moc.cloudagent.controlplane.ControlPlaneResponse") 257 proto.RegisterType((*ControlPlane)(nil), "moc.cloudagent.controlplane.ControlPlane") 258 } 259 260 func init() { proto.RegisterFile("moc_cloudagent_controlplane.proto", fileDescriptor_690e71c673ae0745) } 261 262 var fileDescriptor_690e71c673ae0745 = []byte{ 263 // 441 bytes of a gzipped FileDescriptorProto 264 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0xd1, 0x6e, 0xd3, 0x30, 265 0x14, 0x9d, 0xbb, 0x35, 0xa8, 0xb7, 0x6b, 0x05, 0x66, 0x12, 0x51, 0x91, 0x50, 0x09, 0x2f, 0x05, 266 0x09, 0x07, 0x02, 0x3f, 0xc0, 0x80, 0x07, 0x24, 0xb4, 0x21, 0x83, 0x78, 0xe0, 0x65, 0x4a, 0x1d, 267 0xb7, 0x44, 0x24, 0xbe, 0x9e, 0xed, 0x80, 0x78, 0xe7, 0x33, 0xf8, 0x09, 0x3e, 0x8b, 0xbf, 0x40, 268 0xb6, 0x03, 0x6b, 0x84, 0x84, 0x86, 0xb4, 0xa7, 0x9c, 0xdc, 0x7b, 0xce, 0xf1, 0xf5, 0xf1, 0x85, 269 0xbb, 0x2d, 0x8a, 0x33, 0xd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 294 // Reference imports to suppress errors if they are not otherwise used. 295 var _ context.Context 296 var _ grpc.ClientConn 297 298 // This is a compile-time assertion to ensure that this generated file 299 // is compatible with the grpc package it is being compiled against. 300 const _ = grpc.SupportPackageIsVersion4 301 302 // ControlPlaneAgentClient is the client API for ControlPlaneAgent service. 303 // 304 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 305 type ControlPlaneAgentClient interface { 306 Invoke(ctx context.Context, in *ControlPlaneRequest, opts ...grpc.CallOption) (*ControlPlaneResponse, error) 307 } 308 309 type controlPlaneAgentClient struct { 310 cc *grpc.ClientConn 311 } 312 313 func NewControlPlaneAgentClient(cc *grpc.ClientConn) ControlPlaneAgentClient { 314 return &controlPlaneAgentClient{cc} 315 } 316 317 func (c *controlPlaneAgentClient) Invoke(ctx context.Context, in *ControlPlaneRequest, opts ...grpc.CallOption) (*ControlPlaneResponse, error) { 318 out := new(ControlPlaneResponse) 319 err := c.cc.Invoke(ctx, "/moc.cloudagent.controlplane.ControlPlaneAgent/Invoke", in, out, opts...) 320 if err != nil { 321 return nil, err 322 } 323 return out, nil 324 } 325 326 // ControlPlaneAgentServer is the server API for ControlPlaneAgent service. 327 type ControlPlaneAgentServer interface { 328 Invoke(context.Context, *ControlPlaneRequest) (*ControlPlaneResponse, error) 329 } 330 331 // UnimplementedControlPlaneAgentServer can be embedded to have forward compatible implementations. 332 type UnimplementedControlPlaneAgentServer struct { 333 } 334 335 func (*UnimplementedControlPlaneAgentServer) Invoke(ctx context.Context, req *ControlPlaneRequest) (*ControlPlaneResponse, error) { 336 return nil, status.Errorf(codes.Unimplemented, "method Invoke not implemented") 337 } 338 339 func RegisterControlPlaneAgentServer(s *grpc.Server, srv ControlPlaneAgentServer) { 340 s.RegisterService(&_ControlPlaneAgent_serviceDesc, srv) 341 } 342 343 func _ControlPlaneAgent_Invoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 344 in := new(ControlPlaneRequest) 345 if err := dec(in); err != nil { 346 return nil, err 347 } 348 if interceptor == nil { 349 return srv.(ControlPlaneAgentServer).Invoke(ctx, in) 350 } 351 info := &grpc.UnaryServerInfo{ 352 Server: srv, 353 FullMethod: "/moc.cloudagent.controlplane.ControlPlaneAgent/Invoke", 354 } 355 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 356 return srv.(ControlPlaneAgentServer).Invoke(ctx, req.(*ControlPlaneRequest)) 357 } 358 return interceptor(ctx, in, info, handler) 359 } 360 361 var _ControlPlaneAgent_serviceDesc = grpc.ServiceDesc{ 362 ServiceName: "moc.cloudagent.controlplane.ControlPlaneAgent", 363 HandlerType: (*ControlPlaneAgentServer)(nil), 364 Methods: []grpc.MethodDesc{ 365 { 366 MethodName: "Invoke", 367 Handler: _ControlPlaneAgent_Invoke_Handler, 368 }, 369 }, 370 Streams: []grpc.StreamDesc{}, 371 Metadata: "moc_cloudagent_controlplane.proto", 372 }