github.com/microsoft/moc@v0.17.1/rpc/common/admin/moc_common_health.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: admin/health/moc_common_health.proto 3 4 package admin 5 6 import ( 7 context "context" 8 fmt "fmt" 9 proto "github.com/golang/protobuf/proto" 10 empty "github.com/golang/protobuf/ptypes/empty" 11 wrappers "github.com/golang/protobuf/ptypes/wrappers" 12 common "github.com/microsoft/moc/rpc/common" 13 grpc "google.golang.org/grpc" 14 codes "google.golang.org/grpc/codes" 15 status "google.golang.org/grpc/status" 16 math "math" 17 ) 18 19 // Reference imports to suppress errors if they are not otherwise used. 20 var _ = proto.Marshal 21 var _ = fmt.Errorf 22 var _ = math.Inf 23 24 // This is a compile-time assertion to ensure that this generated file 25 // is compatible with the proto package it is being compiled against. 26 // A compilation error at this line likely means your copy of the 27 // proto package needs to be updated. 28 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 29 30 type HealthRequest struct { 31 TimeoutSeconds uint32 `protobuf:"varint,1,opt,name=timeoutSeconds,proto3" json:"timeoutSeconds,omitempty"` 32 XXX_NoUnkeyedLiteral struct{} `json:"-"` 33 XXX_unrecognized []byte `json:"-"` 34 XXX_sizecache int32 `json:"-"` 35 } 36 37 func (m *HealthRequest) Reset() { *m = HealthRequest{} } 38 func (m *HealthRequest) String() string { return proto.CompactTextString(m) } 39 func (*HealthRequest) ProtoMessage() {} 40 func (*HealthRequest) Descriptor() ([]byte, []int) { 41 return fileDescriptor_4d110a1beda4379f, []int{0} 42 } 43 44 func (m *HealthRequest) XXX_Unmarshal(b []byte) error { 45 return xxx_messageInfo_HealthRequest.Unmarshal(m, b) 46 } 47 func (m *HealthRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 48 return xxx_messageInfo_HealthRequest.Marshal(b, m, deterministic) 49 } 50 func (m *HealthRequest) XXX_Merge(src proto.Message) { 51 xxx_messageInfo_HealthRequest.Merge(m, src) 52 } 53 func (m *HealthRequest) XXX_Size() int { 54 return xxx_messageInfo_HealthRequest.Size(m) 55 } 56 func (m *HealthRequest) XXX_DiscardUnknown() { 57 xxx_messageInfo_HealthRequest.DiscardUnknown(m) 58 } 59 60 var xxx_messageInfo_HealthRequest proto.InternalMessageInfo 61 62 func (m *HealthRequest) GetTimeoutSeconds() uint32 { 63 if m != nil { 64 return m.TimeoutSeconds 65 } 66 return 0 67 } 68 69 type HealthResponse struct { 70 Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"` 71 Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"` 72 State common.HealthState `protobuf:"varint,4,opt,name=State,proto3,enum=moc.HealthState" json:"State,omitempty"` 73 Rebooted bool `protobuf:"varint,5,opt,name=Rebooted,proto3" json:"Rebooted,omitempty"` 74 XXX_NoUnkeyedLiteral struct{} `json:"-"` 75 XXX_unrecognized []byte `json:"-"` 76 XXX_sizecache int32 `json:"-"` 77 } 78 79 func (m *HealthResponse) Reset() { *m = HealthResponse{} } 80 func (m *HealthResponse) String() string { return proto.CompactTextString(m) } 81 func (*HealthResponse) ProtoMessage() {} 82 func (*HealthResponse) Descriptor() ([]byte, []int) { 83 return fileDescriptor_4d110a1beda4379f, []int{1} 84 } 85 86 func (m *HealthResponse) XXX_Unmarshal(b []byte) error { 87 return xxx_messageInfo_HealthResponse.Unmarshal(m, b) 88 } 89 func (m *HealthResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 90 return xxx_messageInfo_HealthResponse.Marshal(b, m, deterministic) 91 } 92 func (m *HealthResponse) XXX_Merge(src proto.Message) { 93 xxx_messageInfo_HealthResponse.Merge(m, src) 94 } 95 func (m *HealthResponse) XXX_Size() int { 96 return xxx_messageInfo_HealthResponse.Size(m) 97 } 98 func (m *HealthResponse) XXX_DiscardUnknown() { 99 xxx_messageInfo_HealthResponse.DiscardUnknown(m) 100 } 101 102 var xxx_messageInfo_HealthResponse proto.InternalMessageInfo 103 104 func (m *HealthResponse) GetResult() *wrappers.BoolValue { 105 if m != nil { 106 return m.Result 107 } 108 return nil 109 } 110 111 func (m *HealthResponse) GetError() string { 112 if m != nil { 113 return m.Error 114 } 115 return "" 116 } 117 118 func (m *HealthResponse) GetState() common.HealthState { 119 if m != nil { 120 return m.State 121 } 122 return common.HealthState_NOTKNOWN 123 } 124 125 func (m *HealthResponse) GetRebooted() bool { 126 if m != nil { 127 return m.Rebooted 128 } 129 return false 130 } 131 132 type AgentInfoResponse struct { 133 Node *common.NodeInfo `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` 134 Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"` 135 Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"` 136 DeploymentId string `protobuf:"bytes,4,opt,name=deploymentId,proto3" json:"deploymentId,omitempty"` 137 XXX_NoUnkeyedLiteral struct{} `json:"-"` 138 XXX_unrecognized []byte `json:"-"` 139 XXX_sizecache int32 `json:"-"` 140 } 141 142 func (m *AgentInfoResponse) Reset() { *m = AgentInfoResponse{} } 143 func (m *AgentInfoResponse) String() string { return proto.CompactTextString(m) } 144 func (*AgentInfoResponse) ProtoMessage() {} 145 func (*AgentInfoResponse) Descriptor() ([]byte, []int) { 146 return fileDescriptor_4d110a1beda4379f, []int{2} 147 } 148 149 func (m *AgentInfoResponse) XXX_Unmarshal(b []byte) error { 150 return xxx_messageInfo_AgentInfoResponse.Unmarshal(m, b) 151 } 152 func (m *AgentInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 153 return xxx_messageInfo_AgentInfoResponse.Marshal(b, m, deterministic) 154 } 155 func (m *AgentInfoResponse) XXX_Merge(src proto.Message) { 156 xxx_messageInfo_AgentInfoResponse.Merge(m, src) 157 } 158 func (m *AgentInfoResponse) XXX_Size() int { 159 return xxx_messageInfo_AgentInfoResponse.Size(m) 160 } 161 func (m *AgentInfoResponse) XXX_DiscardUnknown() { 162 xxx_messageInfo_AgentInfoResponse.DiscardUnknown(m) 163 } 164 165 var xxx_messageInfo_AgentInfoResponse proto.InternalMessageInfo 166 167 func (m *AgentInfoResponse) GetNode() *common.NodeInfo { 168 if m != nil { 169 return m.Node 170 } 171 return nil 172 } 173 174 func (m *AgentInfoResponse) GetResult() *wrappers.BoolValue { 175 if m != nil { 176 return m.Result 177 } 178 return nil 179 } 180 181 func (m *AgentInfoResponse) GetError() string { 182 if m != nil { 183 return m.Error 184 } 185 return "" 186 } 187 188 func (m *AgentInfoResponse) GetDeploymentId() string { 189 if m != nil { 190 return m.DeploymentId 191 } 192 return "" 193 } 194 195 func init() { 196 proto.RegisterType((*HealthRequest)(nil), "moc.common.admin.HealthRequest") 197 proto.RegisterType((*HealthResponse)(nil), "moc.common.admin.HealthResponse") 198 proto.RegisterType((*AgentInfoResponse)(nil), "moc.common.admin.AgentInfoResponse") 199 } 200 201 func init() { 202 proto.RegisterFile("admin/health/moc_common_health.proto", fileDescriptor_4d110a1beda4379f) 203 } 204 205 var fileDescriptor_4d110a1beda4379f = []byte{ 206 // 416 bytes of a gzipped FileDescriptorProto 207 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0x4d, 0x6f, 0xd4, 0x30, 208 0x10, 0xad, 0xa1, 0x5b, 0xb5, 0x4e, 0xbb, 0x2a, 0x56, 0x05, 0x21, 0x48, 0x10, 0x05, 0x54, 0x05, 209 0x21, 0xd9, 0x52, 0x38, 0x70, 0xa6, 0xa8, 0x02, 0x0e, 0x70, 0x70, 0x25, 0x0e, 0x5c, 0xaa, 0x7c, 210 0x4c, 0x3e, 0x44, 0xec, 0x09, 0x8e, 0x23, 0xd4, 0x3f, 0xc3, 0x1f, 0xe0, 0xc2, 0x4f, 0x44, 0xb1, 211 0xb7, 0xab, 0xed, 0xae, 0xb8, 0xf5, 0xe8, 0xf7, 0x9e, 0x67, 0xde, 0x9b, 0x19, 0xfa, 0x2a, 0xaf, 212 0x54, 0xa7, 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x50, 0x85, 0x8b, 0x98, 0xa4, 0x87, 0x72, 0xfd, 0x4e, 0xfe, 0x10, 0xfa, 224 0xe8, 0x7d, 0x03, 0xda, 0x7e, 0xd6, 0x35, 0xae, 0x3d, 0xa6, 0x74, 0x7f, 0x9e, 0x80, 0x0b, 0x15, 225 0x64, 0x67, 0x7c, 0x63, 0x03, 0x5f, 0xb1, 0x02, 0xa7, 0x75, 0x8a, 0x7b, 0x4c, 0x93, 0xd0, 0xe3, 226 0x0a, 0x86, 0x1e, 0x6f, 0xd4, 0xec, 0xa6, 0x72, 0xa1, 0x8e, 0xe4, 0x1d, 0x2c, 0xfb, 0x4b, 0x68, 227 0xe0, 0x03, 0x3a, 0xcf, 0x4c, 0xd2, 0xe0, 0x43, 0x0b, 0xe5, 0x0f, 0x8f, 0xb1, 0x17, 0x7c, 0xfb, 228 0x54, 0xf8, 0x9d, 0xb5, 0x45, 0xf1, 0xff, 0x05, 0x3e, 0x79, 0xb2, 0xc7, 0xbe, 0xd0, 0xe3, 0x8f, 229 0x60, 0xd7, 0x33, 0x61, 0x8f, 0x77, 0x12, 0x5d, 0xce, 0xd7, 0x16, 0xbd, 0xdc, 0xad, 0xb5, 0x33, 230 0xc8, 0x64, 0xef, 0xe2, 0xcd, 0xf7, 0xd7, 0x4d, 0x67, 0xdb, 0xa9, 0x98, 0xa5, 0x42, 0x75, 0xa5, 231 0xc1, 0x11, 0x6b, 0x3b, 0x5f, 0xbb, 0x30, 0x43, 0x29, 0x7c, 0x01, 0xe1, 0x0a, 0x14, 0x07, 0xae, 232 0xc7, 0xdb, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3e, 0x88, 0xf2, 0xbc, 0x19, 0x03, 0x00, 0x00, 233 } 234 235 // Reference imports to suppress errors if they are not otherwise used. 236 var _ context.Context 237 var _ grpc.ClientConn 238 239 // This is a compile-time assertion to ensure that this generated file 240 // is compatible with the grpc package it is being compiled against. 241 const _ = grpc.SupportPackageIsVersion4 242 243 // HealthAgentClient is the client API for HealthAgent service. 244 // 245 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 246 type HealthAgentClient interface { 247 CheckHealth(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error) 248 GetAgentInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*AgentInfoResponse, error) 249 } 250 251 type healthAgentClient struct { 252 cc *grpc.ClientConn 253 } 254 255 func NewHealthAgentClient(cc *grpc.ClientConn) HealthAgentClient { 256 return &healthAgentClient{cc} 257 } 258 259 func (c *healthAgentClient) CheckHealth(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error) { 260 out := new(HealthResponse) 261 err := c.cc.Invoke(ctx, "/moc.common.admin.HealthAgent/CheckHealth", in, out, opts...) 262 if err != nil { 263 return nil, err 264 } 265 return out, nil 266 } 267 268 func (c *healthAgentClient) GetAgentInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*AgentInfoResponse, error) { 269 out := new(AgentInfoResponse) 270 err := c.cc.Invoke(ctx, "/moc.common.admin.HealthAgent/GetAgentInfo", in, out, opts...) 271 if err != nil { 272 return nil, err 273 } 274 return out, nil 275 } 276 277 // HealthAgentServer is the server API for HealthAgent service. 278 type HealthAgentServer interface { 279 CheckHealth(context.Context, *HealthRequest) (*HealthResponse, error) 280 GetAgentInfo(context.Context, *empty.Empty) (*AgentInfoResponse, error) 281 } 282 283 // UnimplementedHealthAgentServer can be embedded to have forward compatible implementations. 284 type UnimplementedHealthAgentServer struct { 285 } 286 287 func (*UnimplementedHealthAgentServer) CheckHealth(ctx context.Context, req *HealthRequest) (*HealthResponse, error) { 288 return nil, status.Errorf(codes.Unimplemented, "method CheckHealth not implemented") 289 } 290 func (*UnimplementedHealthAgentServer) GetAgentInfo(ctx context.Context, req *empty.Empty) (*AgentInfoResponse, error) { 291 return nil, status.Errorf(codes.Unimplemented, "method GetAgentInfo not implemented") 292 } 293 294 func RegisterHealthAgentServer(s *grpc.Server, srv HealthAgentServer) { 295 s.RegisterService(&_HealthAgent_serviceDesc, srv) 296 } 297 298 func _HealthAgent_CheckHealth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 299 in := new(HealthRequest) 300 if err := dec(in); err != nil { 301 return nil, err 302 } 303 if interceptor == nil { 304 return srv.(HealthAgentServer).CheckHealth(ctx, in) 305 } 306 info := &grpc.UnaryServerInfo{ 307 Server: srv, 308 FullMethod: "/moc.common.admin.HealthAgent/CheckHealth", 309 } 310 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 311 return srv.(HealthAgentServer).CheckHealth(ctx, req.(*HealthRequest)) 312 } 313 return interceptor(ctx, in, info, handler) 314 } 315 316 func _HealthAgent_GetAgentInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 317 in := new(empty.Empty) 318 if err := dec(in); err != nil { 319 return nil, err 320 } 321 if interceptor == nil { 322 return srv.(HealthAgentServer).GetAgentInfo(ctx, in) 323 } 324 info := &grpc.UnaryServerInfo{ 325 Server: srv, 326 FullMethod: "/moc.common.admin.HealthAgent/GetAgentInfo", 327 } 328 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 329 return srv.(HealthAgentServer).GetAgentInfo(ctx, req.(*empty.Empty)) 330 } 331 return interceptor(ctx, in, info, handler) 332 } 333 334 var _HealthAgent_serviceDesc = grpc.ServiceDesc{ 335 ServiceName: "moc.common.admin.HealthAgent", 336 HandlerType: (*HealthAgentServer)(nil), 337 Methods: []grpc.MethodDesc{ 338 { 339 MethodName: "CheckHealth", 340 Handler: _HealthAgent_CheckHealth_Handler, 341 }, 342 { 343 MethodName: "GetAgentInfo", 344 Handler: _HealthAgent_GetAgentInfo_Handler, 345 }, 346 }, 347 Streams: []grpc.StreamDesc{}, 348 Metadata: "admin/health/moc_common_health.proto", 349 }