1
2
3
4
5
6
7 package envoy_service_metrics_v3
8
9 import (
10 context "context"
11 _ "github.com/cncf/udpa/go/udpa/annotations"
12 v3 "github.com/datawire/ambassador/v2/pkg/api/envoy/config/core/v3"
13 _ "github.com/envoyproxy/protoc-gen-validate/validate"
14 proto "github.com/golang/protobuf/proto"
15 _go "github.com/prometheus/client_model/go"
16 grpc "google.golang.org/grpc"
17 codes "google.golang.org/grpc/codes"
18 status "google.golang.org/grpc/status"
19 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
20 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
21 reflect "reflect"
22 sync "sync"
23 )
24
25 const (
26
27 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
28
29 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
30 )
31
32
33
34 const _ = proto.ProtoPackageIsVersion4
35
36 type StreamMetricsResponse struct {
37 state protoimpl.MessageState
38 sizeCache protoimpl.SizeCache
39 unknownFields protoimpl.UnknownFields
40 }
41
42 func (x *StreamMetricsResponse) Reset() {
43 *x = StreamMetricsResponse{}
44 if protoimpl.UnsafeEnabled {
45 mi := &file_envoy_service_metrics_v3_metrics_service_proto_msgTypes[0]
46 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
47 ms.StoreMessageInfo(mi)
48 }
49 }
50
51 func (x *StreamMetricsResponse) String() string {
52 return protoimpl.X.MessageStringOf(x)
53 }
54
55 func (*StreamMetricsResponse) ProtoMessage() {}
56
57 func (x *StreamMetricsResponse) ProtoReflect() protoreflect.Message {
58 mi := &file_envoy_service_metrics_v3_metrics_service_proto_msgTypes[0]
59 if protoimpl.UnsafeEnabled && x != nil {
60 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
61 if ms.LoadMessageInfo() == nil {
62 ms.StoreMessageInfo(mi)
63 }
64 return ms
65 }
66 return mi.MessageOf(x)
67 }
68
69
70 func (*StreamMetricsResponse) Descriptor() ([]byte, []int) {
71 return file_envoy_service_metrics_v3_metrics_service_proto_rawDescGZIP(), []int{0}
72 }
73
74 type StreamMetricsMessage struct {
75 state protoimpl.MessageState
76 sizeCache protoimpl.SizeCache
77 unknownFields protoimpl.UnknownFields
78
79
80
81 Identifier *StreamMetricsMessage_Identifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
82
83 EnvoyMetrics []*_go.MetricFamily `protobuf:"bytes,2,rep,name=envoy_metrics,json=envoyMetrics,proto3" json:"envoy_metrics,omitempty"`
84 }
85
86 func (x *StreamMetricsMessage) Reset() {
87 *x = StreamMetricsMessage{}
88 if protoimpl.UnsafeEnabled {
89 mi := &file_envoy_service_metrics_v3_metrics_service_proto_msgTypes[1]
90 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
91 ms.StoreMessageInfo(mi)
92 }
93 }
94
95 func (x *StreamMetricsMessage) String() string {
96 return protoimpl.X.MessageStringOf(x)
97 }
98
99 func (*StreamMetricsMessage) ProtoMessage() {}
100
101 func (x *StreamMetricsMessage) ProtoReflect() protoreflect.Message {
102 mi := &file_envoy_service_metrics_v3_metrics_service_proto_msgTypes[1]
103 if protoimpl.UnsafeEnabled && x != nil {
104 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
105 if ms.LoadMessageInfo() == nil {
106 ms.StoreMessageInfo(mi)
107 }
108 return ms
109 }
110 return mi.MessageOf(x)
111 }
112
113
114 func (*StreamMetricsMessage) Descriptor() ([]byte, []int) {
115 return file_envoy_service_metrics_v3_metrics_service_proto_rawDescGZIP(), []int{1}
116 }
117
118 func (x *StreamMetricsMessage) GetIdentifier() *StreamMetricsMessage_Identifier {
119 if x != nil {
120 return x.Identifier
121 }
122 return nil
123 }
124
125 func (x *StreamMetricsMessage) GetEnvoyMetrics() []*_go.MetricFamily {
126 if x != nil {
127 return x.EnvoyMetrics
128 }
129 return nil
130 }
131
132 type StreamMetricsMessage_Identifier struct {
133 state protoimpl.MessageState
134 sizeCache protoimpl.SizeCache
135 unknownFields protoimpl.UnknownFields
136
137
138 Node *v3.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
139 }
140
141 func (x *StreamMetricsMessage_Identifier) Reset() {
142 *x = StreamMetricsMessage_Identifier{}
143 if protoimpl.UnsafeEnabled {
144 mi := &file_envoy_service_metrics_v3_metrics_service_proto_msgTypes[2]
145 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
146 ms.StoreMessageInfo(mi)
147 }
148 }
149
150 func (x *StreamMetricsMessage_Identifier) String() string {
151 return protoimpl.X.MessageStringOf(x)
152 }
153
154 func (*StreamMetricsMessage_Identifier) ProtoMessage() {}
155
156 func (x *StreamMetricsMessage_Identifier) ProtoReflect() protoreflect.Message {
157 mi := &file_envoy_service_metrics_v3_metrics_service_proto_msgTypes[2]
158 if protoimpl.UnsafeEnabled && x != nil {
159 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
160 if ms.LoadMessageInfo() == nil {
161 ms.StoreMessageInfo(mi)
162 }
163 return ms
164 }
165 return mi.MessageOf(x)
166 }
167
168
169 func (*StreamMetricsMessage_Identifier) Descriptor() ([]byte, []int) {
170 return file_envoy_service_metrics_v3_metrics_service_proto_rawDescGZIP(), []int{1, 0}
171 }
172
173 func (x *StreamMetricsMessage_Identifier) GetNode() *v3.Node {
174 if x != nil {
175 return x.Node
176 }
177 return nil
178 }
179
180 var File_envoy_service_metrics_v3_metrics_service_proto protoreflect.FileDescriptor
181
182 var file_envoy_service_metrics_v3_metrics_service_proto_rawDesc = []byte{
183 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
184 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69,
185 0x63, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
186 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
187 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f,
188 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33,
189 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x6d, 0x65, 0x74,
190 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61,
191 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61,
192 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f,
193 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73,
194 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61,
195 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e,
196 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4e, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d,
197 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x35,
198 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72,
199 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e,
200 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73,
201 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xfa, 0x02, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d,
202 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x59,
203 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01,
204 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
205 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74,
206 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61,
207 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x69,
208 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x0d, 0x65, 0x6e, 0x76,
209 0x6f, 0x79, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
210 0x32, 0x22, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73,
211 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, 0x61,
212 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x0c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69,
213 0x63, 0x73, 0x1a, 0x87, 0x01, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65,
214 0x72, 0x12, 0x38, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
215 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63,
216 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05,
217 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x3a, 0x3f, 0x9a, 0xc5, 0x88,
218 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
219 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72,
220 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
221 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3a, 0x34, 0x9a, 0xc5,
222 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
223 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74,
224 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61,
225 0x67, 0x65, 0x32, 0x86, 0x01, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65,
226 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x74, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d,
227 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73,
228 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76,
229 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d,
230 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73,
231 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76,
232 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52,
233 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x42, 0x4a, 0x0a, 0x26, 0x69,
234 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76,
235 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69,
236 0x63, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x13, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65,
237 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba,
238 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
239 }
240
241 var (
242 file_envoy_service_metrics_v3_metrics_service_proto_rawDescOnce sync.Once
243 file_envoy_service_metrics_v3_metrics_service_proto_rawDescData = file_envoy_service_metrics_v3_metrics_service_proto_rawDesc
244 )
245
246 func file_envoy_service_metrics_v3_metrics_service_proto_rawDescGZIP() []byte {
247 file_envoy_service_metrics_v3_metrics_service_proto_rawDescOnce.Do(func() {
248 file_envoy_service_metrics_v3_metrics_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_metrics_v3_metrics_service_proto_rawDescData)
249 })
250 return file_envoy_service_metrics_v3_metrics_service_proto_rawDescData
251 }
252
253 var file_envoy_service_metrics_v3_metrics_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
254 var file_envoy_service_metrics_v3_metrics_service_proto_goTypes = []interface{}{
255 (*StreamMetricsResponse)(nil),
256 (*StreamMetricsMessage)(nil),
257 (*StreamMetricsMessage_Identifier)(nil),
258 (*_go.MetricFamily)(nil),
259 (*v3.Node)(nil),
260 }
261 var file_envoy_service_metrics_v3_metrics_service_proto_depIdxs = []int32{
262 2,
263 3,
264 4,
265 1,
266 0,
267 4,
268 3,
269 3,
270 3,
271 0,
272 }
273
274 func init() { file_envoy_service_metrics_v3_metrics_service_proto_init() }
275 func file_envoy_service_metrics_v3_metrics_service_proto_init() {
276 if File_envoy_service_metrics_v3_metrics_service_proto != nil {
277 return
278 }
279 if !protoimpl.UnsafeEnabled {
280 file_envoy_service_metrics_v3_metrics_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
281 switch v := v.(*StreamMetricsResponse); i {
282 case 0:
283 return &v.state
284 case 1:
285 return &v.sizeCache
286 case 2:
287 return &v.unknownFields
288 default:
289 return nil
290 }
291 }
292 file_envoy_service_metrics_v3_metrics_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
293 switch v := v.(*StreamMetricsMessage); i {
294 case 0:
295 return &v.state
296 case 1:
297 return &v.sizeCache
298 case 2:
299 return &v.unknownFields
300 default:
301 return nil
302 }
303 }
304 file_envoy_service_metrics_v3_metrics_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
305 switch v := v.(*StreamMetricsMessage_Identifier); i {
306 case 0:
307 return &v.state
308 case 1:
309 return &v.sizeCache
310 case 2:
311 return &v.unknownFields
312 default:
313 return nil
314 }
315 }
316 }
317 type x struct{}
318 out := protoimpl.TypeBuilder{
319 File: protoimpl.DescBuilder{
320 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
321 RawDescriptor: file_envoy_service_metrics_v3_metrics_service_proto_rawDesc,
322 NumEnums: 0,
323 NumMessages: 3,
324 NumExtensions: 0,
325 NumServices: 1,
326 },
327 GoTypes: file_envoy_service_metrics_v3_metrics_service_proto_goTypes,
328 DependencyIndexes: file_envoy_service_metrics_v3_metrics_service_proto_depIdxs,
329 MessageInfos: file_envoy_service_metrics_v3_metrics_service_proto_msgTypes,
330 }.Build()
331 File_envoy_service_metrics_v3_metrics_service_proto = out.File
332 file_envoy_service_metrics_v3_metrics_service_proto_rawDesc = nil
333 file_envoy_service_metrics_v3_metrics_service_proto_goTypes = nil
334 file_envoy_service_metrics_v3_metrics_service_proto_depIdxs = nil
335 }
336
337
338 var _ context.Context
339 var _ grpc.ClientConnInterface
340
341
342
343 const _ = grpc.SupportPackageIsVersion6
344
345
346
347
348 type MetricsServiceClient interface {
349
350
351 StreamMetrics(ctx context.Context, opts ...grpc.CallOption) (MetricsService_StreamMetricsClient, error)
352 }
353
354 type metricsServiceClient struct {
355 cc grpc.ClientConnInterface
356 }
357
358 func NewMetricsServiceClient(cc grpc.ClientConnInterface) MetricsServiceClient {
359 return &metricsServiceClient{cc}
360 }
361
362 func (c *metricsServiceClient) StreamMetrics(ctx context.Context, opts ...grpc.CallOption) (MetricsService_StreamMetricsClient, error) {
363 stream, err := c.cc.NewStream(ctx, &_MetricsService_serviceDesc.Streams[0], "/envoy.service.metrics.v3.MetricsService/StreamMetrics", opts...)
364 if err != nil {
365 return nil, err
366 }
367 x := &metricsServiceStreamMetricsClient{stream}
368 return x, nil
369 }
370
371 type MetricsService_StreamMetricsClient interface {
372 Send(*StreamMetricsMessage) error
373 CloseAndRecv() (*StreamMetricsResponse, error)
374 grpc.ClientStream
375 }
376
377 type metricsServiceStreamMetricsClient struct {
378 grpc.ClientStream
379 }
380
381 func (x *metricsServiceStreamMetricsClient) Send(m *StreamMetricsMessage) error {
382 return x.ClientStream.SendMsg(m)
383 }
384
385 func (x *metricsServiceStreamMetricsClient) CloseAndRecv() (*StreamMetricsResponse, error) {
386 if err := x.ClientStream.CloseSend(); err != nil {
387 return nil, err
388 }
389 m := new(StreamMetricsResponse)
390 if err := x.ClientStream.RecvMsg(m); err != nil {
391 return nil, err
392 }
393 return m, nil
394 }
395
396
397 type MetricsServiceServer interface {
398
399
400 StreamMetrics(MetricsService_StreamMetricsServer) error
401 }
402
403
404 type UnimplementedMetricsServiceServer struct {
405 }
406
407 func (*UnimplementedMetricsServiceServer) StreamMetrics(MetricsService_StreamMetricsServer) error {
408 return status.Errorf(codes.Unimplemented, "method StreamMetrics not implemented")
409 }
410
411 func RegisterMetricsServiceServer(s *grpc.Server, srv MetricsServiceServer) {
412 s.RegisterService(&_MetricsService_serviceDesc, srv)
413 }
414
415 func _MetricsService_StreamMetrics_Handler(srv interface{}, stream grpc.ServerStream) error {
416 return srv.(MetricsServiceServer).StreamMetrics(&metricsServiceStreamMetricsServer{stream})
417 }
418
419 type MetricsService_StreamMetricsServer interface {
420 SendAndClose(*StreamMetricsResponse) error
421 Recv() (*StreamMetricsMessage, error)
422 grpc.ServerStream
423 }
424
425 type metricsServiceStreamMetricsServer struct {
426 grpc.ServerStream
427 }
428
429 func (x *metricsServiceStreamMetricsServer) SendAndClose(m *StreamMetricsResponse) error {
430 return x.ServerStream.SendMsg(m)
431 }
432
433 func (x *metricsServiceStreamMetricsServer) Recv() (*StreamMetricsMessage, error) {
434 m := new(StreamMetricsMessage)
435 if err := x.ServerStream.RecvMsg(m); err != nil {
436 return nil, err
437 }
438 return m, nil
439 }
440
441 var _MetricsService_serviceDesc = grpc.ServiceDesc{
442 ServiceName: "envoy.service.metrics.v3.MetricsService",
443 HandlerType: (*MetricsServiceServer)(nil),
444 Methods: []grpc.MethodDesc{},
445 Streams: []grpc.StreamDesc{
446 {
447 StreamName: "StreamMetrics",
448 Handler: _MetricsService_StreamMetrics_Handler,
449 ClientStreams: true,
450 },
451 },
452 Metadata: "envoy/service/metrics/v3/metrics_service.proto",
453 }
454
View as plain text