...

Source file src/github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/metrics/v2/metrics_service.pb.go

Documentation: github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/metrics/v2

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // versions:
     3  // 	protoc-gen-go v1.28.1
     4  // 	protoc        v3.21.12
     5  // source: envoy/service/metrics/v2/metrics_service.proto
     6  
     7  package metricsv2
     8  
     9  import (
    10  	context "context"
    11  	_ "github.com/cncf/xds/go/udpa/annotations"
    12  	core "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/core"
    13  	_ "github.com/envoyproxy/protoc-gen-validate/validate"
    14  	_go "github.com/prometheus/client_model/go"
    15  	grpc "google.golang.org/grpc"
    16  	codes "google.golang.org/grpc/codes"
    17  	status "google.golang.org/grpc/status"
    18  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    19  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    20  	reflect "reflect"
    21  	sync "sync"
    22  )
    23  
    24  const (
    25  	// Verify that this generated code is sufficiently up-to-date.
    26  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    27  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    28  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    29  )
    30  
    31  type StreamMetricsResponse struct {
    32  	state         protoimpl.MessageState
    33  	sizeCache     protoimpl.SizeCache
    34  	unknownFields protoimpl.UnknownFields
    35  }
    36  
    37  func (x *StreamMetricsResponse) Reset() {
    38  	*x = StreamMetricsResponse{}
    39  	if protoimpl.UnsafeEnabled {
    40  		mi := &file_envoy_service_metrics_v2_metrics_service_proto_msgTypes[0]
    41  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    42  		ms.StoreMessageInfo(mi)
    43  	}
    44  }
    45  
    46  func (x *StreamMetricsResponse) String() string {
    47  	return protoimpl.X.MessageStringOf(x)
    48  }
    49  
    50  func (*StreamMetricsResponse) ProtoMessage() {}
    51  
    52  func (x *StreamMetricsResponse) ProtoReflect() protoreflect.Message {
    53  	mi := &file_envoy_service_metrics_v2_metrics_service_proto_msgTypes[0]
    54  	if protoimpl.UnsafeEnabled && x != nil {
    55  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    56  		if ms.LoadMessageInfo() == nil {
    57  			ms.StoreMessageInfo(mi)
    58  		}
    59  		return ms
    60  	}
    61  	return mi.MessageOf(x)
    62  }
    63  
    64  // Deprecated: Use StreamMetricsResponse.ProtoReflect.Descriptor instead.
    65  func (*StreamMetricsResponse) Descriptor() ([]byte, []int) {
    66  	return file_envoy_service_metrics_v2_metrics_service_proto_rawDescGZIP(), []int{0}
    67  }
    68  
    69  type StreamMetricsMessage struct {
    70  	state         protoimpl.MessageState
    71  	sizeCache     protoimpl.SizeCache
    72  	unknownFields protoimpl.UnknownFields
    73  
    74  	// Identifier data effectively is a structured metadata. As a performance optimization this will
    75  	// only be sent in the first message on the stream.
    76  	Identifier *StreamMetricsMessage_Identifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
    77  	// A list of metric entries
    78  	EnvoyMetrics []*_go.MetricFamily `protobuf:"bytes,2,rep,name=envoy_metrics,json=envoyMetrics,proto3" json:"envoy_metrics,omitempty"`
    79  }
    80  
    81  func (x *StreamMetricsMessage) Reset() {
    82  	*x = StreamMetricsMessage{}
    83  	if protoimpl.UnsafeEnabled {
    84  		mi := &file_envoy_service_metrics_v2_metrics_service_proto_msgTypes[1]
    85  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    86  		ms.StoreMessageInfo(mi)
    87  	}
    88  }
    89  
    90  func (x *StreamMetricsMessage) String() string {
    91  	return protoimpl.X.MessageStringOf(x)
    92  }
    93  
    94  func (*StreamMetricsMessage) ProtoMessage() {}
    95  
    96  func (x *StreamMetricsMessage) ProtoReflect() protoreflect.Message {
    97  	mi := &file_envoy_service_metrics_v2_metrics_service_proto_msgTypes[1]
    98  	if protoimpl.UnsafeEnabled && x != nil {
    99  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   100  		if ms.LoadMessageInfo() == nil {
   101  			ms.StoreMessageInfo(mi)
   102  		}
   103  		return ms
   104  	}
   105  	return mi.MessageOf(x)
   106  }
   107  
   108  // Deprecated: Use StreamMetricsMessage.ProtoReflect.Descriptor instead.
   109  func (*StreamMetricsMessage) Descriptor() ([]byte, []int) {
   110  	return file_envoy_service_metrics_v2_metrics_service_proto_rawDescGZIP(), []int{1}
   111  }
   112  
   113  func (x *StreamMetricsMessage) GetIdentifier() *StreamMetricsMessage_Identifier {
   114  	if x != nil {
   115  		return x.Identifier
   116  	}
   117  	return nil
   118  }
   119  
   120  func (x *StreamMetricsMessage) GetEnvoyMetrics() []*_go.MetricFamily {
   121  	if x != nil {
   122  		return x.EnvoyMetrics
   123  	}
   124  	return nil
   125  }
   126  
   127  type StreamMetricsMessage_Identifier struct {
   128  	state         protoimpl.MessageState
   129  	sizeCache     protoimpl.SizeCache
   130  	unknownFields protoimpl.UnknownFields
   131  
   132  	// The node sending metrics over the stream.
   133  	Node *core.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
   134  }
   135  
   136  func (x *StreamMetricsMessage_Identifier) Reset() {
   137  	*x = StreamMetricsMessage_Identifier{}
   138  	if protoimpl.UnsafeEnabled {
   139  		mi := &file_envoy_service_metrics_v2_metrics_service_proto_msgTypes[2]
   140  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   141  		ms.StoreMessageInfo(mi)
   142  	}
   143  }
   144  
   145  func (x *StreamMetricsMessage_Identifier) String() string {
   146  	return protoimpl.X.MessageStringOf(x)
   147  }
   148  
   149  func (*StreamMetricsMessage_Identifier) ProtoMessage() {}
   150  
   151  func (x *StreamMetricsMessage_Identifier) ProtoReflect() protoreflect.Message {
   152  	mi := &file_envoy_service_metrics_v2_metrics_service_proto_msgTypes[2]
   153  	if protoimpl.UnsafeEnabled && x != nil {
   154  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   155  		if ms.LoadMessageInfo() == nil {
   156  			ms.StoreMessageInfo(mi)
   157  		}
   158  		return ms
   159  	}
   160  	return mi.MessageOf(x)
   161  }
   162  
   163  // Deprecated: Use StreamMetricsMessage_Identifier.ProtoReflect.Descriptor instead.
   164  func (*StreamMetricsMessage_Identifier) Descriptor() ([]byte, []int) {
   165  	return file_envoy_service_metrics_v2_metrics_service_proto_rawDescGZIP(), []int{1, 0}
   166  }
   167  
   168  func (x *StreamMetricsMessage_Identifier) GetNode() *core.Node {
   169  	if x != nil {
   170  		return x.Node
   171  	}
   172  	return nil
   173  }
   174  
   175  var File_envoy_service_metrics_v2_metrics_service_proto protoreflect.FileDescriptor
   176  
   177  var file_envoy_service_metrics_v2_metrics_service_proto_rawDesc = []byte{
   178  	0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
   179  	0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69,
   180  	0x63, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
   181  	0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
   182  	0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f,
   183  	0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x61,
   184  	0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x69, 0x6f, 0x2f, 0x70, 0x72, 0x6f,
   185  	0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x6d,
   186  	0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64,
   187  	0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73,
   188  	0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c,
   189  	0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70,
   190  	0x72, 0x6f, 0x74, 0x6f, 0x22, 0x17, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65,
   191  	0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xff, 0x01,
   192  	0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d,
   193  	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x59, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69,
   194  	0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76,
   195  	0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69,
   196  	0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72,
   197  	0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74,
   198  	0x69, 0x66, 0x69, 0x65, 0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65,
   199  	0x72, 0x12, 0x47, 0x0a, 0x0d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69,
   200  	0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72,
   201  	0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e,
   202  	0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x0c, 0x65, 0x6e,
   203  	0x76, 0x6f, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x1a, 0x43, 0x0a, 0x0a, 0x49, 0x64,
   204  	0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65,
   205  	0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61,
   206  	0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x42,
   207  	0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x32,
   208  	0x86, 0x01, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69,
   209  	0x63, 0x65, 0x12, 0x74, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72,
   210  	0x69, 0x63, 0x73, 0x12, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76,
   211  	0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53,
   212  	0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73,
   213  	0x61, 0x67, 0x65, 0x1a, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76,
   214  	0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53,
   215  	0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70,
   216  	0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x42, 0x95, 0x01, 0x0a, 0x26, 0x69, 0x6f, 0x2e,
   217  	0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
   218  	0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73,
   219  	0x2e, 0x76, 0x32, 0x42, 0x13, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76,
   220  	0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68,
   221  	0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78,
   222  	0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61,
   223  	0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
   224  	0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x76, 0x32, 0x3b, 0x6d, 0x65, 0x74, 0x72,
   225  	0x69, 0x63, 0x73, 0x76, 0x32, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01,
   226  	0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   227  }
   228  
   229  var (
   230  	file_envoy_service_metrics_v2_metrics_service_proto_rawDescOnce sync.Once
   231  	file_envoy_service_metrics_v2_metrics_service_proto_rawDescData = file_envoy_service_metrics_v2_metrics_service_proto_rawDesc
   232  )
   233  
   234  func file_envoy_service_metrics_v2_metrics_service_proto_rawDescGZIP() []byte {
   235  	file_envoy_service_metrics_v2_metrics_service_proto_rawDescOnce.Do(func() {
   236  		file_envoy_service_metrics_v2_metrics_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_metrics_v2_metrics_service_proto_rawDescData)
   237  	})
   238  	return file_envoy_service_metrics_v2_metrics_service_proto_rawDescData
   239  }
   240  
   241  var file_envoy_service_metrics_v2_metrics_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
   242  var file_envoy_service_metrics_v2_metrics_service_proto_goTypes = []interface{}{
   243  	(*StreamMetricsResponse)(nil),           // 0: envoy.service.metrics.v2.StreamMetricsResponse
   244  	(*StreamMetricsMessage)(nil),            // 1: envoy.service.metrics.v2.StreamMetricsMessage
   245  	(*StreamMetricsMessage_Identifier)(nil), // 2: envoy.service.metrics.v2.StreamMetricsMessage.Identifier
   246  	(*_go.MetricFamily)(nil),                // 3: io.prometheus.client.MetricFamily
   247  	(*core.Node)(nil),                       // 4: envoy.api.v2.core.Node
   248  }
   249  var file_envoy_service_metrics_v2_metrics_service_proto_depIdxs = []int32{
   250  	2, // 0: envoy.service.metrics.v2.StreamMetricsMessage.identifier:type_name -> envoy.service.metrics.v2.StreamMetricsMessage.Identifier
   251  	3, // 1: envoy.service.metrics.v2.StreamMetricsMessage.envoy_metrics:type_name -> io.prometheus.client.MetricFamily
   252  	4, // 2: envoy.service.metrics.v2.StreamMetricsMessage.Identifier.node:type_name -> envoy.api.v2.core.Node
   253  	1, // 3: envoy.service.metrics.v2.MetricsService.StreamMetrics:input_type -> envoy.service.metrics.v2.StreamMetricsMessage
   254  	0, // 4: envoy.service.metrics.v2.MetricsService.StreamMetrics:output_type -> envoy.service.metrics.v2.StreamMetricsResponse
   255  	4, // [4:5] is the sub-list for method output_type
   256  	3, // [3:4] is the sub-list for method input_type
   257  	3, // [3:3] is the sub-list for extension type_name
   258  	3, // [3:3] is the sub-list for extension extendee
   259  	0, // [0:3] is the sub-list for field type_name
   260  }
   261  
   262  func init() { file_envoy_service_metrics_v2_metrics_service_proto_init() }
   263  func file_envoy_service_metrics_v2_metrics_service_proto_init() {
   264  	if File_envoy_service_metrics_v2_metrics_service_proto != nil {
   265  		return
   266  	}
   267  	if !protoimpl.UnsafeEnabled {
   268  		file_envoy_service_metrics_v2_metrics_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   269  			switch v := v.(*StreamMetricsResponse); i {
   270  			case 0:
   271  				return &v.state
   272  			case 1:
   273  				return &v.sizeCache
   274  			case 2:
   275  				return &v.unknownFields
   276  			default:
   277  				return nil
   278  			}
   279  		}
   280  		file_envoy_service_metrics_v2_metrics_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   281  			switch v := v.(*StreamMetricsMessage); 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_v2_metrics_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
   293  			switch v := v.(*StreamMetricsMessage_Identifier); 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  	}
   305  	type x struct{}
   306  	out := protoimpl.TypeBuilder{
   307  		File: protoimpl.DescBuilder{
   308  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   309  			RawDescriptor: file_envoy_service_metrics_v2_metrics_service_proto_rawDesc,
   310  			NumEnums:      0,
   311  			NumMessages:   3,
   312  			NumExtensions: 0,
   313  			NumServices:   1,
   314  		},
   315  		GoTypes:           file_envoy_service_metrics_v2_metrics_service_proto_goTypes,
   316  		DependencyIndexes: file_envoy_service_metrics_v2_metrics_service_proto_depIdxs,
   317  		MessageInfos:      file_envoy_service_metrics_v2_metrics_service_proto_msgTypes,
   318  	}.Build()
   319  	File_envoy_service_metrics_v2_metrics_service_proto = out.File
   320  	file_envoy_service_metrics_v2_metrics_service_proto_rawDesc = nil
   321  	file_envoy_service_metrics_v2_metrics_service_proto_goTypes = nil
   322  	file_envoy_service_metrics_v2_metrics_service_proto_depIdxs = nil
   323  }
   324  
   325  // Reference imports to suppress errors if they are not otherwise used.
   326  var _ context.Context
   327  var _ grpc.ClientConnInterface
   328  
   329  // This is a compile-time assertion to ensure that this generated file
   330  // is compatible with the grpc package it is being compiled against.
   331  const _ = grpc.SupportPackageIsVersion6
   332  
   333  // MetricsServiceClient is the client API for MetricsService service.
   334  //
   335  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   336  type MetricsServiceClient interface {
   337  	// Envoy will connect and send StreamMetricsMessage messages forever. It does not expect any
   338  	// response to be sent as nothing would be done in the case of failure.
   339  	StreamMetrics(ctx context.Context, opts ...grpc.CallOption) (MetricsService_StreamMetricsClient, error)
   340  }
   341  
   342  type metricsServiceClient struct {
   343  	cc grpc.ClientConnInterface
   344  }
   345  
   346  func NewMetricsServiceClient(cc grpc.ClientConnInterface) MetricsServiceClient {
   347  	return &metricsServiceClient{cc}
   348  }
   349  
   350  func (c *metricsServiceClient) StreamMetrics(ctx context.Context, opts ...grpc.CallOption) (MetricsService_StreamMetricsClient, error) {
   351  	stream, err := c.cc.NewStream(ctx, &_MetricsService_serviceDesc.Streams[0], "/envoy.service.metrics.v2.MetricsService/StreamMetrics", opts...)
   352  	if err != nil {
   353  		return nil, err
   354  	}
   355  	x := &metricsServiceStreamMetricsClient{stream}
   356  	return x, nil
   357  }
   358  
   359  type MetricsService_StreamMetricsClient interface {
   360  	Send(*StreamMetricsMessage) error
   361  	CloseAndRecv() (*StreamMetricsResponse, error)
   362  	grpc.ClientStream
   363  }
   364  
   365  type metricsServiceStreamMetricsClient struct {
   366  	grpc.ClientStream
   367  }
   368  
   369  func (x *metricsServiceStreamMetricsClient) Send(m *StreamMetricsMessage) error {
   370  	return x.ClientStream.SendMsg(m)
   371  }
   372  
   373  func (x *metricsServiceStreamMetricsClient) CloseAndRecv() (*StreamMetricsResponse, error) {
   374  	if err := x.ClientStream.CloseSend(); err != nil {
   375  		return nil, err
   376  	}
   377  	m := new(StreamMetricsResponse)
   378  	if err := x.ClientStream.RecvMsg(m); err != nil {
   379  		return nil, err
   380  	}
   381  	return m, nil
   382  }
   383  
   384  // MetricsServiceServer is the server API for MetricsService service.
   385  type MetricsServiceServer interface {
   386  	// Envoy will connect and send StreamMetricsMessage messages forever. It does not expect any
   387  	// response to be sent as nothing would be done in the case of failure.
   388  	StreamMetrics(MetricsService_StreamMetricsServer) error
   389  }
   390  
   391  // UnimplementedMetricsServiceServer can be embedded to have forward compatible implementations.
   392  type UnimplementedMetricsServiceServer struct {
   393  }
   394  
   395  func (*UnimplementedMetricsServiceServer) StreamMetrics(MetricsService_StreamMetricsServer) error {
   396  	return status.Errorf(codes.Unimplemented, "method StreamMetrics not implemented")
   397  }
   398  
   399  func RegisterMetricsServiceServer(s *grpc.Server, srv MetricsServiceServer) {
   400  	s.RegisterService(&_MetricsService_serviceDesc, srv)
   401  }
   402  
   403  func _MetricsService_StreamMetrics_Handler(srv interface{}, stream grpc.ServerStream) error {
   404  	return srv.(MetricsServiceServer).StreamMetrics(&metricsServiceStreamMetricsServer{stream})
   405  }
   406  
   407  type MetricsService_StreamMetricsServer interface {
   408  	SendAndClose(*StreamMetricsResponse) error
   409  	Recv() (*StreamMetricsMessage, error)
   410  	grpc.ServerStream
   411  }
   412  
   413  type metricsServiceStreamMetricsServer struct {
   414  	grpc.ServerStream
   415  }
   416  
   417  func (x *metricsServiceStreamMetricsServer) SendAndClose(m *StreamMetricsResponse) error {
   418  	return x.ServerStream.SendMsg(m)
   419  }
   420  
   421  func (x *metricsServiceStreamMetricsServer) Recv() (*StreamMetricsMessage, error) {
   422  	m := new(StreamMetricsMessage)
   423  	if err := x.ServerStream.RecvMsg(m); err != nil {
   424  		return nil, err
   425  	}
   426  	return m, nil
   427  }
   428  
   429  var _MetricsService_serviceDesc = grpc.ServiceDesc{
   430  	ServiceName: "envoy.service.metrics.v2.MetricsService",
   431  	HandlerType: (*MetricsServiceServer)(nil),
   432  	Methods:     []grpc.MethodDesc{},
   433  	Streams: []grpc.StreamDesc{
   434  		{
   435  			StreamName:    "StreamMetrics",
   436  			Handler:       _MetricsService_StreamMetrics_Handler,
   437  			ClientStreams: true,
   438  		},
   439  	},
   440  	Metadata: "envoy/service/metrics/v2/metrics_service.proto",
   441  }
   442  

View as plain text