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