...

Source file src/github.com/datawire/ambassador/v2/pkg/api/envoy/service/metrics/v4alpha/metrics_service.pb.go

Documentation: github.com/datawire/ambassador/v2/pkg/api/envoy/service/metrics/v4alpha

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // versions:
     3  // 	protoc-gen-go v1.25.0
     4  // 	protoc        v3.14.0
     5  // source: envoy/service/metrics/v4alpha/metrics_service.proto
     6  
     7  package envoy_service_metrics_v4alpha
     8  
     9  import (
    10  	context "context"
    11  	_ "github.com/cncf/udpa/go/udpa/annotations"
    12  	v4alpha "github.com/datawire/ambassador/v2/pkg/api/envoy/config/core/v4alpha"
    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  	// Verify that this generated code is sufficiently up-to-date.
    27  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    28  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    29  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    30  )
    31  
    32  // This is a compile-time assertion that a sufficiently up-to-date version
    33  // of the legacy proto package is being used.
    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_v4alpha_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_v4alpha_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  // Deprecated: Use StreamMetricsResponse.ProtoReflect.Descriptor instead.
    70  func (*StreamMetricsResponse) Descriptor() ([]byte, []int) {
    71  	return file_envoy_service_metrics_v4alpha_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  	// Identifier data effectively is a structured metadata. As a performance optimization this will
    80  	// only be sent in the first message on the stream.
    81  	Identifier *StreamMetricsMessage_Identifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
    82  	// A list of metric entries
    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_v4alpha_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_v4alpha_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  // Deprecated: Use StreamMetricsMessage.ProtoReflect.Descriptor instead.
   114  func (*StreamMetricsMessage) Descriptor() ([]byte, []int) {
   115  	return file_envoy_service_metrics_v4alpha_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  	// The node sending metrics over the stream.
   138  	Node *v4alpha.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_v4alpha_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_v4alpha_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  // Deprecated: Use StreamMetricsMessage_Identifier.ProtoReflect.Descriptor instead.
   169  func (*StreamMetricsMessage_Identifier) Descriptor() ([]byte, []int) {
   170  	return file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDescGZIP(), []int{1, 0}
   171  }
   172  
   173  func (x *StreamMetricsMessage_Identifier) GetNode() *v4alpha.Node {
   174  	if x != nil {
   175  		return x.Node
   176  	}
   177  	return nil
   178  }
   179  
   180  var File_envoy_service_metrics_v4alpha_metrics_service_proto protoreflect.FileDescriptor
   181  
   182  var file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDesc = []byte{
   183  	0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
   184  	0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f,
   185  	0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
   186  	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72,
   187  	0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x34, 0x61,
   188  	0x6c, 0x70, 0x68, 0x61, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66,
   189  	0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f,
   190  	0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x6d, 0x65, 0x74, 0x72,
   191  	0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f,
   192  	0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74,
   193  	0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61,
   194  	0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69,
   195  	0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c,
   196  	0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70,
   197  	0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4e, 0x0a, 0x15, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65,
   198  	0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x3a, 0x35, 0x9a,
   199  	0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76,
   200  	0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53,
   201  	0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70,
   202  	0x6f, 0x6e, 0x73, 0x65, 0x22, 0x84, 0x03, 0x0a, 0x14, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d,
   203  	0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x5e, 0x0a,
   204  	0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
   205  	0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
   206  	0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68,
   207  	0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d,
   208  	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65,
   209  	0x72, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x47, 0x0a,
   210  	0x0d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x02,
   211  	0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74,
   212  	0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x72,
   213  	0x69, 0x63, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x0c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x4d,
   214  	0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x1a, 0x8c, 0x01, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74,
   215  	0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20,
   216  	0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66,
   217  	0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
   218  	0x4e, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04,
   219  	0x6e, 0x6f, 0x64, 0x65, 0x3a, 0x3f, 0x9a, 0xc5, 0x88, 0x1e, 0x3a, 0x0a, 0x38, 0x65, 0x6e, 0x76,
   220  	0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69,
   221  	0x63, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72,
   222  	0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74,
   223  	0x69, 0x66, 0x69, 0x65, 0x72, 0x3a, 0x34, 0x9a, 0xc5, 0x88, 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e,
   224  	0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72,
   225  	0x69, 0x63, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74,
   226  	0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x90, 0x01, 0x0a, 0x0e,
   227  	0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e,
   228  	0x0a, 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12,
   229  	0x33, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
   230  	0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
   231  	0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4d, 0x65, 0x73,
   232  	0x73, 0x61, 0x67, 0x65, 0x1a, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72,
   233  	0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x34, 0x61,
   234  	0x6c, 0x70, 0x68, 0x61, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x72, 0x69,
   235  	0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x42, 0x4f,
   236  	0x0a, 0x2b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e,
   237  	0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6d, 0x65,
   238  	0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x76, 0x34, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x42, 0x13, 0x4d,
   239  	0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f,
   240  	0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x03, 0x62,
   241  	0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   242  }
   243  
   244  var (
   245  	file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDescOnce sync.Once
   246  	file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDescData = file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDesc
   247  )
   248  
   249  func file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDescGZIP() []byte {
   250  	file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDescOnce.Do(func() {
   251  		file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDescData)
   252  	})
   253  	return file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDescData
   254  }
   255  
   256  var file_envoy_service_metrics_v4alpha_metrics_service_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
   257  var file_envoy_service_metrics_v4alpha_metrics_service_proto_goTypes = []interface{}{
   258  	(*StreamMetricsResponse)(nil),           // 0: envoy.service.metrics.v4alpha.StreamMetricsResponse
   259  	(*StreamMetricsMessage)(nil),            // 1: envoy.service.metrics.v4alpha.StreamMetricsMessage
   260  	(*StreamMetricsMessage_Identifier)(nil), // 2: envoy.service.metrics.v4alpha.StreamMetricsMessage.Identifier
   261  	(*_go.MetricFamily)(nil),                // 3: io.prometheus.client.MetricFamily
   262  	(*v4alpha.Node)(nil),                    // 4: envoy.config.core.v4alpha.Node
   263  }
   264  var file_envoy_service_metrics_v4alpha_metrics_service_proto_depIdxs = []int32{
   265  	2, // 0: envoy.service.metrics.v4alpha.StreamMetricsMessage.identifier:type_name -> envoy.service.metrics.v4alpha.StreamMetricsMessage.Identifier
   266  	3, // 1: envoy.service.metrics.v4alpha.StreamMetricsMessage.envoy_metrics:type_name -> io.prometheus.client.MetricFamily
   267  	4, // 2: envoy.service.metrics.v4alpha.StreamMetricsMessage.Identifier.node:type_name -> envoy.config.core.v4alpha.Node
   268  	1, // 3: envoy.service.metrics.v4alpha.MetricsService.StreamMetrics:input_type -> envoy.service.metrics.v4alpha.StreamMetricsMessage
   269  	0, // 4: envoy.service.metrics.v4alpha.MetricsService.StreamMetrics:output_type -> envoy.service.metrics.v4alpha.StreamMetricsResponse
   270  	4, // [4:5] is the sub-list for method output_type
   271  	3, // [3:4] is the sub-list for method input_type
   272  	3, // [3:3] is the sub-list for extension type_name
   273  	3, // [3:3] is the sub-list for extension extendee
   274  	0, // [0:3] is the sub-list for field type_name
   275  }
   276  
   277  func init() { file_envoy_service_metrics_v4alpha_metrics_service_proto_init() }
   278  func file_envoy_service_metrics_v4alpha_metrics_service_proto_init() {
   279  	if File_envoy_service_metrics_v4alpha_metrics_service_proto != nil {
   280  		return
   281  	}
   282  	if !protoimpl.UnsafeEnabled {
   283  		file_envoy_service_metrics_v4alpha_metrics_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   284  			switch v := v.(*StreamMetricsResponse); i {
   285  			case 0:
   286  				return &v.state
   287  			case 1:
   288  				return &v.sizeCache
   289  			case 2:
   290  				return &v.unknownFields
   291  			default:
   292  				return nil
   293  			}
   294  		}
   295  		file_envoy_service_metrics_v4alpha_metrics_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   296  			switch v := v.(*StreamMetricsMessage); i {
   297  			case 0:
   298  				return &v.state
   299  			case 1:
   300  				return &v.sizeCache
   301  			case 2:
   302  				return &v.unknownFields
   303  			default:
   304  				return nil
   305  			}
   306  		}
   307  		file_envoy_service_metrics_v4alpha_metrics_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
   308  			switch v := v.(*StreamMetricsMessage_Identifier); i {
   309  			case 0:
   310  				return &v.state
   311  			case 1:
   312  				return &v.sizeCache
   313  			case 2:
   314  				return &v.unknownFields
   315  			default:
   316  				return nil
   317  			}
   318  		}
   319  	}
   320  	type x struct{}
   321  	out := protoimpl.TypeBuilder{
   322  		File: protoimpl.DescBuilder{
   323  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   324  			RawDescriptor: file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDesc,
   325  			NumEnums:      0,
   326  			NumMessages:   3,
   327  			NumExtensions: 0,
   328  			NumServices:   1,
   329  		},
   330  		GoTypes:           file_envoy_service_metrics_v4alpha_metrics_service_proto_goTypes,
   331  		DependencyIndexes: file_envoy_service_metrics_v4alpha_metrics_service_proto_depIdxs,
   332  		MessageInfos:      file_envoy_service_metrics_v4alpha_metrics_service_proto_msgTypes,
   333  	}.Build()
   334  	File_envoy_service_metrics_v4alpha_metrics_service_proto = out.File
   335  	file_envoy_service_metrics_v4alpha_metrics_service_proto_rawDesc = nil
   336  	file_envoy_service_metrics_v4alpha_metrics_service_proto_goTypes = nil
   337  	file_envoy_service_metrics_v4alpha_metrics_service_proto_depIdxs = nil
   338  }
   339  
   340  // Reference imports to suppress errors if they are not otherwise used.
   341  var _ context.Context
   342  var _ grpc.ClientConnInterface
   343  
   344  // This is a compile-time assertion to ensure that this generated file
   345  // is compatible with the grpc package it is being compiled against.
   346  const _ = grpc.SupportPackageIsVersion6
   347  
   348  // MetricsServiceClient is the client API for MetricsService service.
   349  //
   350  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   351  type MetricsServiceClient interface {
   352  	// Envoy will connect and send StreamMetricsMessage messages forever. It does not expect any
   353  	// response to be sent as nothing would be done in the case of failure.
   354  	StreamMetrics(ctx context.Context, opts ...grpc.CallOption) (MetricsService_StreamMetricsClient, error)
   355  }
   356  
   357  type metricsServiceClient struct {
   358  	cc grpc.ClientConnInterface
   359  }
   360  
   361  func NewMetricsServiceClient(cc grpc.ClientConnInterface) MetricsServiceClient {
   362  	return &metricsServiceClient{cc}
   363  }
   364  
   365  func (c *metricsServiceClient) StreamMetrics(ctx context.Context, opts ...grpc.CallOption) (MetricsService_StreamMetricsClient, error) {
   366  	stream, err := c.cc.NewStream(ctx, &_MetricsService_serviceDesc.Streams[0], "/envoy.service.metrics.v4alpha.MetricsService/StreamMetrics", opts...)
   367  	if err != nil {
   368  		return nil, err
   369  	}
   370  	x := &metricsServiceStreamMetricsClient{stream}
   371  	return x, nil
   372  }
   373  
   374  type MetricsService_StreamMetricsClient interface {
   375  	Send(*StreamMetricsMessage) error
   376  	CloseAndRecv() (*StreamMetricsResponse, error)
   377  	grpc.ClientStream
   378  }
   379  
   380  type metricsServiceStreamMetricsClient struct {
   381  	grpc.ClientStream
   382  }
   383  
   384  func (x *metricsServiceStreamMetricsClient) Send(m *StreamMetricsMessage) error {
   385  	return x.ClientStream.SendMsg(m)
   386  }
   387  
   388  func (x *metricsServiceStreamMetricsClient) CloseAndRecv() (*StreamMetricsResponse, error) {
   389  	if err := x.ClientStream.CloseSend(); err != nil {
   390  		return nil, err
   391  	}
   392  	m := new(StreamMetricsResponse)
   393  	if err := x.ClientStream.RecvMsg(m); err != nil {
   394  		return nil, err
   395  	}
   396  	return m, nil
   397  }
   398  
   399  // MetricsServiceServer is the server API for MetricsService service.
   400  type MetricsServiceServer interface {
   401  	// Envoy will connect and send StreamMetricsMessage messages forever. It does not expect any
   402  	// response to be sent as nothing would be done in the case of failure.
   403  	StreamMetrics(MetricsService_StreamMetricsServer) error
   404  }
   405  
   406  // UnimplementedMetricsServiceServer can be embedded to have forward compatible implementations.
   407  type UnimplementedMetricsServiceServer struct {
   408  }
   409  
   410  func (*UnimplementedMetricsServiceServer) StreamMetrics(MetricsService_StreamMetricsServer) error {
   411  	return status.Errorf(codes.Unimplemented, "method StreamMetrics not implemented")
   412  }
   413  
   414  func RegisterMetricsServiceServer(s *grpc.Server, srv MetricsServiceServer) {
   415  	s.RegisterService(&_MetricsService_serviceDesc, srv)
   416  }
   417  
   418  func _MetricsService_StreamMetrics_Handler(srv interface{}, stream grpc.ServerStream) error {
   419  	return srv.(MetricsServiceServer).StreamMetrics(&metricsServiceStreamMetricsServer{stream})
   420  }
   421  
   422  type MetricsService_StreamMetricsServer interface {
   423  	SendAndClose(*StreamMetricsResponse) error
   424  	Recv() (*StreamMetricsMessage, error)
   425  	grpc.ServerStream
   426  }
   427  
   428  type metricsServiceStreamMetricsServer struct {
   429  	grpc.ServerStream
   430  }
   431  
   432  func (x *metricsServiceStreamMetricsServer) SendAndClose(m *StreamMetricsResponse) error {
   433  	return x.ServerStream.SendMsg(m)
   434  }
   435  
   436  func (x *metricsServiceStreamMetricsServer) Recv() (*StreamMetricsMessage, error) {
   437  	m := new(StreamMetricsMessage)
   438  	if err := x.ServerStream.RecvMsg(m); err != nil {
   439  		return nil, err
   440  	}
   441  	return m, nil
   442  }
   443  
   444  var _MetricsService_serviceDesc = grpc.ServiceDesc{
   445  	ServiceName: "envoy.service.metrics.v4alpha.MetricsService",
   446  	HandlerType: (*MetricsServiceServer)(nil),
   447  	Methods:     []grpc.MethodDesc{},
   448  	Streams: []grpc.StreamDesc{
   449  		{
   450  			StreamName:    "StreamMetrics",
   451  			Handler:       _MetricsService_StreamMetrics_Handler,
   452  			ClientStreams: true,
   453  		},
   454  	},
   455  	Metadata: "envoy/service/metrics/v4alpha/metrics_service.proto",
   456  }
   457  

View as plain text