-
Notifications
You must be signed in to change notification settings - Fork 0
/
info.pb.go
278 lines (245 loc) · 9.23 KB
/
info.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
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: info/info.proto
package info
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// A Report about the service
type Report struct {
// Version of the service
Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
// Build date of the service
Date string `protobuf:"bytes,2,opt,name=date,proto3" json:"date,omitempty"`
// Repository name
Repo string `protobuf:"bytes,3,opt,name=repo,proto3" json:"repo,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Report) Reset() { *m = Report{} }
func (m *Report) String() string { return proto.CompactTextString(m) }
func (*Report) ProtoMessage() {}
func (*Report) Descriptor() ([]byte, []int) {
return fileDescriptor_3955287c00436ed0, []int{0}
}
func (m *Report) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Report.Unmarshal(m, b)
}
func (m *Report) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Report.Marshal(b, m, deterministic)
}
func (m *Report) XXX_Merge(src proto.Message) {
xxx_messageInfo_Report.Merge(m, src)
}
func (m *Report) XXX_Size() int {
return xxx_messageInfo_Report.Size(m)
}
func (m *Report) XXX_DiscardUnknown() {
xxx_messageInfo_Report.DiscardUnknown(m)
}
var xxx_messageInfo_Report proto.InternalMessageInfo
func (m *Report) GetVersion() string {
if m != nil {
return m.Version
}
return ""
}
func (m *Report) GetDate() string {
if m != nil {
return m.Date
}
return ""
}
func (m *Report) GetRepo() string {
if m != nil {
return m.Repo
}
return ""
}
// A Health report about the service
type Health struct {
// Health state
Alive bool `protobuf:"varint,1,opt,name=alive,proto3" json:"alive,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Health) Reset() { *m = Health{} }
func (m *Health) String() string { return proto.CompactTextString(m) }
func (*Health) ProtoMessage() {}
func (*Health) Descriptor() ([]byte, []int) {
return fileDescriptor_3955287c00436ed0, []int{1}
}
func (m *Health) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Health.Unmarshal(m, b)
}
func (m *Health) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Health.Marshal(b, m, deterministic)
}
func (m *Health) XXX_Merge(src proto.Message) {
xxx_messageInfo_Health.Merge(m, src)
}
func (m *Health) XXX_Size() int {
return xxx_messageInfo_Health.Size(m)
}
func (m *Health) XXX_DiscardUnknown() {
xxx_messageInfo_Health.DiscardUnknown(m)
}
var xxx_messageInfo_Health proto.InternalMessageInfo
func (m *Health) GetAlive() bool {
if m != nil {
return m.Alive
}
return false
}
func init() {
proto.RegisterType((*Report)(nil), "info.Report")
proto.RegisterType((*Health)(nil), "info.Health")
}
func init() {
proto.RegisterFile("info/info.proto", fileDescriptor_3955287c00436ed0)
}
var fileDescriptor_3955287c00436ed0 = []byte{
// 275 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x8f, 0xc1, 0x4a, 0xc4, 0x30,
0x10, 0x86, 0xd9, 0x75, 0xed, 0xee, 0x86, 0x05, 0x25, 0x88, 0x94, 0x2a, 0x22, 0x05, 0xd1, 0x53,
0x82, 0xfa, 0x04, 0x0a, 0xcb, 0xaa, 0xc7, 0x1e, 0xbd, 0xa5, 0x35, 0x6d, 0x83, 0x6d, 0x26, 0xa4,
0xb3, 0x05, 0xaf, 0x3e, 0x81, 0xe0, 0xa3, 0xf9, 0x0a, 0x3e, 0x88, 0x64, 0xb2, 0x7b, 0xf6, 0x12,
0xfe, 0xff, 0xcf, 0xf0, 0xcd, 0x3f, 0xec, 0xc8, 0xd8, 0x1a, 0x64, 0x78, 0x84, 0xf3, 0x80, 0xc0,
0x67, 0x41, 0x67, 0xe7, 0x0d, 0x40, 0xd3, 0x69, 0xa9, 0x9c, 0x91, 0xca, 0x5a, 0x40, 0x85, 0x06,
0xec, 0x10, 0x67, 0xb2, 0xb3, 0xdd, 0x2f, 0xb9, 0x72, 0x5b, 0x4b, 0xdd, 0x3b, 0xfc, 0x88, 0x9f,
0xf9, 0x0b, 0x4b, 0x0a, 0xed, 0xc0, 0x23, 0x4f, 0xd9, 0x7c, 0xd4, 0x7e, 0x30, 0x60, 0xd3, 0xc9,
0xe5, 0xe4, 0x66, 0x59, 0xec, 0x2d, 0xe7, 0x6c, 0xf6, 0xa6, 0x50, 0xa7, 0x53, 0x8a, 0x49, 0x87,
0xcc, 0x6b, 0x07, 0xe9, 0x41, 0xcc, 0x82, 0xce, 0x2f, 0x58, 0xf2, 0xa4, 0x55, 0x87, 0x2d, 0x3f,
0x61, 0x87, 0xaa, 0x33, 0xa3, 0x26, 0xd2, 0xa2, 0x88, 0xe6, 0xee, 0x6b, 0xc2, 0x66, 0xcf, 0xb6,
0x06, 0xfe, 0xc0, 0xe6, 0x1b, 0x8d, 0x24, 0x4f, 0x45, 0x6c, 0x27, 0xf6, 0xed, 0xc4, 0x3a, 0xb4,
0xcb, 0x56, 0x82, 0xae, 0x8c, 0xdd, 0xf2, 0xe3, 0xcf, 0x9f, 0xdf, 0xef, 0x29, 0xe3, 0x0b, 0x39,
0xde, 0xd2, 0xf9, 0x7c, 0xcd, 0x96, 0x1b, 0x8d, 0xbb, 0x75, 0xff, 0x40, 0xe2, 0x54, 0xce, 0x09,
0xb2, 0xe2, 0x2c, 0x40, 0x5a, 0xca, 0x1e, 0xaf, 0x5f, 0xaf, 0x1a, 0x83, 0xed, 0xb6, 0x14, 0x15,
0xf4, 0x12, 0xd5, 0xbb, 0xea, 0x95, 0x6c, 0xbc, 0xab, 0x64, 0x05, 0x16, 0xbd, 0xaa, 0x70, 0xa0,
0x7d, 0x65, 0x42, 0xe8, 0xfb, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc2, 0xd0, 0x05, 0xe2, 0x82,
0x01, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// 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.SupportPackageIsVersion6
// InfoClient is the client API for Info service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type InfoClient interface {
// Get an information about the service
GetInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Report, error)
// Get a health information for the service
GetHealth(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Health, error)
}
type infoClient struct {
cc grpc.ClientConnInterface
}
func NewInfoClient(cc grpc.ClientConnInterface) InfoClient {
return &infoClient{cc}
}
func (c *infoClient) GetInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Report, error) {
out := new(Report)
err := c.cc.Invoke(ctx, "/info.Info/GetInfo", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *infoClient) GetHealth(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*Health, error) {
out := new(Health)
err := c.cc.Invoke(ctx, "/info.Info/GetHealth", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// InfoServer is the server API for Info service.
type InfoServer interface {
// Get an information about the service
GetInfo(context.Context, *empty.Empty) (*Report, error)
// Get a health information for the service
GetHealth(context.Context, *empty.Empty) (*Health, error)
}
// UnimplementedInfoServer can be embedded to have forward compatible implementations.
type UnimplementedInfoServer struct {
}
func (*UnimplementedInfoServer) GetInfo(ctx context.Context, req *empty.Empty) (*Report, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetInfo not implemented")
}
func (*UnimplementedInfoServer) GetHealth(ctx context.Context, req *empty.Empty) (*Health, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetHealth not implemented")
}
func RegisterInfoServer(s *grpc.Server, srv InfoServer) {
s.RegisterService(&_Info_serviceDesc, srv)
}
func _Info_GetInfo_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.(InfoServer).GetInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/info.Info/GetInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InfoServer).GetInfo(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _Info_GetHealth_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.(InfoServer).GetHealth(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/info.Info/GetHealth",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InfoServer).GetHealth(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
var _Info_serviceDesc = grpc.ServiceDesc{
ServiceName: "info.Info",
HandlerType: (*InfoServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetInfo",
Handler: _Info_GetInfo_Handler,
},
{
MethodName: "GetHealth",
Handler: _Info_GetHealth_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "info/info.proto",
}