...

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

Documentation: github.com/emissary-ingress/emissary/v3/pkg/api/envoy/service/load_stats/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/load_stats/v2/lrs.proto
     6  
     7  package load_statsv2
     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  	endpoint "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2/endpoint"
    14  	duration "github.com/golang/protobuf/ptypes/duration"
    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  // A load report Envoy sends to the management server.
    32  // [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs.
    33  type LoadStatsRequest struct {
    34  	state         protoimpl.MessageState
    35  	sizeCache     protoimpl.SizeCache
    36  	unknownFields protoimpl.UnknownFields
    37  
    38  	// Node identifier for Envoy instance.
    39  	Node *core.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
    40  	// A list of load stats to report.
    41  	ClusterStats []*endpoint.ClusterStats `protobuf:"bytes,2,rep,name=cluster_stats,json=clusterStats,proto3" json:"cluster_stats,omitempty"`
    42  }
    43  
    44  func (x *LoadStatsRequest) Reset() {
    45  	*x = LoadStatsRequest{}
    46  	if protoimpl.UnsafeEnabled {
    47  		mi := &file_envoy_service_load_stats_v2_lrs_proto_msgTypes[0]
    48  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    49  		ms.StoreMessageInfo(mi)
    50  	}
    51  }
    52  
    53  func (x *LoadStatsRequest) String() string {
    54  	return protoimpl.X.MessageStringOf(x)
    55  }
    56  
    57  func (*LoadStatsRequest) ProtoMessage() {}
    58  
    59  func (x *LoadStatsRequest) ProtoReflect() protoreflect.Message {
    60  	mi := &file_envoy_service_load_stats_v2_lrs_proto_msgTypes[0]
    61  	if protoimpl.UnsafeEnabled && x != nil {
    62  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    63  		if ms.LoadMessageInfo() == nil {
    64  			ms.StoreMessageInfo(mi)
    65  		}
    66  		return ms
    67  	}
    68  	return mi.MessageOf(x)
    69  }
    70  
    71  // Deprecated: Use LoadStatsRequest.ProtoReflect.Descriptor instead.
    72  func (*LoadStatsRequest) Descriptor() ([]byte, []int) {
    73  	return file_envoy_service_load_stats_v2_lrs_proto_rawDescGZIP(), []int{0}
    74  }
    75  
    76  func (x *LoadStatsRequest) GetNode() *core.Node {
    77  	if x != nil {
    78  		return x.Node
    79  	}
    80  	return nil
    81  }
    82  
    83  func (x *LoadStatsRequest) GetClusterStats() []*endpoint.ClusterStats {
    84  	if x != nil {
    85  		return x.ClusterStats
    86  	}
    87  	return nil
    88  }
    89  
    90  // The management server sends envoy a LoadStatsResponse with all clusters it
    91  // is interested in learning load stats about.
    92  // [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs.
    93  type LoadStatsResponse struct {
    94  	state         protoimpl.MessageState
    95  	sizeCache     protoimpl.SizeCache
    96  	unknownFields protoimpl.UnknownFields
    97  
    98  	// Clusters to report stats for.
    99  	// Not populated if *send_all_clusters* is true.
   100  	Clusters []string `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"`
   101  	// If true, the client should send all clusters it knows about.
   102  	// Only clients that advertise the "envoy.lrs.supports_send_all_clusters" capability in their
   103  	// :ref:`client_features<envoy_api_field_core.Node.client_features>` field will honor this field.
   104  	SendAllClusters bool `protobuf:"varint,4,opt,name=send_all_clusters,json=sendAllClusters,proto3" json:"send_all_clusters,omitempty"`
   105  	// The minimum interval of time to collect stats over. This is only a minimum for two reasons:
   106  	// 1. There may be some delay from when the timer fires until stats sampling occurs.
   107  	// 2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic
   108  	//    that is observed in between the corresponding previous *LoadStatsRequest* and this
   109  	//    *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period
   110  	//    of inobservability that might otherwise exists between the messages. New clusters are not
   111  	//    subject to this consideration.
   112  	LoadReportingInterval *duration.Duration `protobuf:"bytes,2,opt,name=load_reporting_interval,json=loadReportingInterval,proto3" json:"load_reporting_interval,omitempty"`
   113  	// Set to *true* if the management server supports endpoint granularity
   114  	// report.
   115  	ReportEndpointGranularity bool `protobuf:"varint,3,opt,name=report_endpoint_granularity,json=reportEndpointGranularity,proto3" json:"report_endpoint_granularity,omitempty"`
   116  }
   117  
   118  func (x *LoadStatsResponse) Reset() {
   119  	*x = LoadStatsResponse{}
   120  	if protoimpl.UnsafeEnabled {
   121  		mi := &file_envoy_service_load_stats_v2_lrs_proto_msgTypes[1]
   122  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   123  		ms.StoreMessageInfo(mi)
   124  	}
   125  }
   126  
   127  func (x *LoadStatsResponse) String() string {
   128  	return protoimpl.X.MessageStringOf(x)
   129  }
   130  
   131  func (*LoadStatsResponse) ProtoMessage() {}
   132  
   133  func (x *LoadStatsResponse) ProtoReflect() protoreflect.Message {
   134  	mi := &file_envoy_service_load_stats_v2_lrs_proto_msgTypes[1]
   135  	if protoimpl.UnsafeEnabled && x != nil {
   136  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   137  		if ms.LoadMessageInfo() == nil {
   138  			ms.StoreMessageInfo(mi)
   139  		}
   140  		return ms
   141  	}
   142  	return mi.MessageOf(x)
   143  }
   144  
   145  // Deprecated: Use LoadStatsResponse.ProtoReflect.Descriptor instead.
   146  func (*LoadStatsResponse) Descriptor() ([]byte, []int) {
   147  	return file_envoy_service_load_stats_v2_lrs_proto_rawDescGZIP(), []int{1}
   148  }
   149  
   150  func (x *LoadStatsResponse) GetClusters() []string {
   151  	if x != nil {
   152  		return x.Clusters
   153  	}
   154  	return nil
   155  }
   156  
   157  func (x *LoadStatsResponse) GetSendAllClusters() bool {
   158  	if x != nil {
   159  		return x.SendAllClusters
   160  	}
   161  	return false
   162  }
   163  
   164  func (x *LoadStatsResponse) GetLoadReportingInterval() *duration.Duration {
   165  	if x != nil {
   166  		return x.LoadReportingInterval
   167  	}
   168  	return nil
   169  }
   170  
   171  func (x *LoadStatsResponse) GetReportEndpointGranularity() bool {
   172  	if x != nil {
   173  		return x.ReportEndpointGranularity
   174  	}
   175  	return false
   176  }
   177  
   178  var File_envoy_service_load_stats_v2_lrs_proto protoreflect.FileDescriptor
   179  
   180  var file_envoy_service_load_stats_v2_lrs_proto_rawDesc = []byte{
   181  	0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
   182  	0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x6c, 0x72,
   183  	0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73,
   184  	0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74,
   185  	0x73, 0x2e, 0x76, 0x32, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f,
   186  	0x76, 0x32, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f,
   187  	0x74, 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32,
   188  	0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x72,
   189  	0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f,
   190  	0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72,
   191  	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70,
   192  	0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74,
   193  	0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x01, 0x0a, 0x10, 0x4c,
   194  	0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
   195  	0x2b, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e,
   196  	0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72,
   197  	0x65, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x48, 0x0a, 0x0d,
   198  	0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20,
   199  	0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e,
   200  	0x76, 0x32, 0x2e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x43, 0x6c, 0x75, 0x73,
   201  	0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65,
   202  	0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0xee, 0x01, 0x0a, 0x11, 0x4c, 0x6f, 0x61, 0x64, 0x53,
   203  	0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08,
   204  	0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08,
   205  	0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x65, 0x6e, 0x64,
   206  	0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20,
   207  	0x01, 0x28, 0x08, 0x52, 0x0f, 0x73, 0x65, 0x6e, 0x64, 0x41, 0x6c, 0x6c, 0x43, 0x6c, 0x75, 0x73,
   208  	0x74, 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x17, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x72, 0x65, 0x70,
   209  	0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18,
   210  	0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
   211  	0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
   212  	0x52, 0x15, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x49,
   213  	0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x3e, 0x0a, 0x1b, 0x72, 0x65, 0x70, 0x6f, 0x72,
   214  	0x74, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x67, 0x72, 0x61, 0x6e, 0x75,
   215  	0x6c, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x72, 0x65,
   216  	0x70, 0x6f, 0x72, 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x47, 0x72, 0x61, 0x6e,
   217  	0x75, 0x6c, 0x61, 0x72, 0x69, 0x74, 0x79, 0x32, 0x8e, 0x01, 0x0a, 0x14, 0x4c, 0x6f, 0x61, 0x64,
   218  	0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
   219  	0x12, 0x76, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74,
   220  	0x61, 0x74, 0x73, 0x12, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76,
   221  	0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76,
   222  	0x32, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
   223  	0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
   224  	0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x32,
   225  	0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
   226  	0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x93, 0x01, 0x0a, 0x29, 0x69, 0x6f, 0x2e,
   227  	0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
   228  	0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74,
   229  	0x61, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x42, 0x08, 0x4c, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f,
   230  	0x50, 0x01, 0x5a, 0x4f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65,
   231  	0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e,
   232  	0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79,
   233  	0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74,
   234  	0x61, 0x74, 0x73, 0x2f, 0x76, 0x32, 0x3b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74,
   235  	0x73, 0x76, 0x32, 0x88, 0x01, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06,
   236  	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   237  }
   238  
   239  var (
   240  	file_envoy_service_load_stats_v2_lrs_proto_rawDescOnce sync.Once
   241  	file_envoy_service_load_stats_v2_lrs_proto_rawDescData = file_envoy_service_load_stats_v2_lrs_proto_rawDesc
   242  )
   243  
   244  func file_envoy_service_load_stats_v2_lrs_proto_rawDescGZIP() []byte {
   245  	file_envoy_service_load_stats_v2_lrs_proto_rawDescOnce.Do(func() {
   246  		file_envoy_service_load_stats_v2_lrs_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_load_stats_v2_lrs_proto_rawDescData)
   247  	})
   248  	return file_envoy_service_load_stats_v2_lrs_proto_rawDescData
   249  }
   250  
   251  var file_envoy_service_load_stats_v2_lrs_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
   252  var file_envoy_service_load_stats_v2_lrs_proto_goTypes = []interface{}{
   253  	(*LoadStatsRequest)(nil),      // 0: envoy.service.load_stats.v2.LoadStatsRequest
   254  	(*LoadStatsResponse)(nil),     // 1: envoy.service.load_stats.v2.LoadStatsResponse
   255  	(*core.Node)(nil),             // 2: envoy.api.v2.core.Node
   256  	(*endpoint.ClusterStats)(nil), // 3: envoy.api.v2.endpoint.ClusterStats
   257  	(*duration.Duration)(nil),     // 4: google.protobuf.Duration
   258  }
   259  var file_envoy_service_load_stats_v2_lrs_proto_depIdxs = []int32{
   260  	2, // 0: envoy.service.load_stats.v2.LoadStatsRequest.node:type_name -> envoy.api.v2.core.Node
   261  	3, // 1: envoy.service.load_stats.v2.LoadStatsRequest.cluster_stats:type_name -> envoy.api.v2.endpoint.ClusterStats
   262  	4, // 2: envoy.service.load_stats.v2.LoadStatsResponse.load_reporting_interval:type_name -> google.protobuf.Duration
   263  	0, // 3: envoy.service.load_stats.v2.LoadReportingService.StreamLoadStats:input_type -> envoy.service.load_stats.v2.LoadStatsRequest
   264  	1, // 4: envoy.service.load_stats.v2.LoadReportingService.StreamLoadStats:output_type -> envoy.service.load_stats.v2.LoadStatsResponse
   265  	4, // [4:5] is the sub-list for method output_type
   266  	3, // [3:4] is the sub-list for method input_type
   267  	3, // [3:3] is the sub-list for extension type_name
   268  	3, // [3:3] is the sub-list for extension extendee
   269  	0, // [0:3] is the sub-list for field type_name
   270  }
   271  
   272  func init() { file_envoy_service_load_stats_v2_lrs_proto_init() }
   273  func file_envoy_service_load_stats_v2_lrs_proto_init() {
   274  	if File_envoy_service_load_stats_v2_lrs_proto != nil {
   275  		return
   276  	}
   277  	if !protoimpl.UnsafeEnabled {
   278  		file_envoy_service_load_stats_v2_lrs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   279  			switch v := v.(*LoadStatsRequest); i {
   280  			case 0:
   281  				return &v.state
   282  			case 1:
   283  				return &v.sizeCache
   284  			case 2:
   285  				return &v.unknownFields
   286  			default:
   287  				return nil
   288  			}
   289  		}
   290  		file_envoy_service_load_stats_v2_lrs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   291  			switch v := v.(*LoadStatsResponse); i {
   292  			case 0:
   293  				return &v.state
   294  			case 1:
   295  				return &v.sizeCache
   296  			case 2:
   297  				return &v.unknownFields
   298  			default:
   299  				return nil
   300  			}
   301  		}
   302  	}
   303  	type x struct{}
   304  	out := protoimpl.TypeBuilder{
   305  		File: protoimpl.DescBuilder{
   306  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   307  			RawDescriptor: file_envoy_service_load_stats_v2_lrs_proto_rawDesc,
   308  			NumEnums:      0,
   309  			NumMessages:   2,
   310  			NumExtensions: 0,
   311  			NumServices:   1,
   312  		},
   313  		GoTypes:           file_envoy_service_load_stats_v2_lrs_proto_goTypes,
   314  		DependencyIndexes: file_envoy_service_load_stats_v2_lrs_proto_depIdxs,
   315  		MessageInfos:      file_envoy_service_load_stats_v2_lrs_proto_msgTypes,
   316  	}.Build()
   317  	File_envoy_service_load_stats_v2_lrs_proto = out.File
   318  	file_envoy_service_load_stats_v2_lrs_proto_rawDesc = nil
   319  	file_envoy_service_load_stats_v2_lrs_proto_goTypes = nil
   320  	file_envoy_service_load_stats_v2_lrs_proto_depIdxs = nil
   321  }
   322  
   323  // Reference imports to suppress errors if they are not otherwise used.
   324  var _ context.Context
   325  var _ grpc.ClientConnInterface
   326  
   327  // This is a compile-time assertion to ensure that this generated file
   328  // is compatible with the grpc package it is being compiled against.
   329  const _ = grpc.SupportPackageIsVersion6
   330  
   331  // LoadReportingServiceClient is the client API for LoadReportingService service.
   332  //
   333  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   334  type LoadReportingServiceClient interface {
   335  	// Advanced API to allow for multi-dimensional load balancing by remote
   336  	// server. For receiving LB assignments, the steps are:
   337  	// 1, The management server is configured with per cluster/zone/load metric
   338  	//    capacity configuration. The capacity configuration definition is
   339  	//    outside of the scope of this document.
   340  	// 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters
   341  	//    to balance.
   342  	//
   343  	// Independently, Envoy will initiate a StreamLoadStats bidi stream with a
   344  	// management server:
   345  	// 1. Once a connection establishes, the management server publishes a
   346  	//    LoadStatsResponse for all clusters it is interested in learning load
   347  	//    stats about.
   348  	// 2. For each cluster, Envoy load balances incoming traffic to upstream hosts
   349  	//    based on per-zone weights and/or per-instance weights (if specified)
   350  	//    based on intra-zone LbPolicy. This information comes from the above
   351  	//    {Stream,Fetch}Endpoints.
   352  	// 3. When upstream hosts reply, they optionally add header <define header
   353  	//    name> with ASCII representation of EndpointLoadMetricStats.
   354  	// 4. Envoy aggregates load reports over the period of time given to it in
   355  	//    LoadStatsResponse.load_reporting_interval. This includes aggregation
   356  	//    stats Envoy maintains by itself (total_requests, rpc_errors etc.) as
   357  	//    well as load metrics from upstream hosts.
   358  	// 5. When the timer of load_reporting_interval expires, Envoy sends new
   359  	//    LoadStatsRequest filled with load reports for each cluster.
   360  	// 6. The management server uses the load reports from all reported Envoys
   361  	//    from around the world, computes global assignment and prepares traffic
   362  	//    assignment destined for each zone Envoys are located in. Goto 2.
   363  	StreamLoadStats(ctx context.Context, opts ...grpc.CallOption) (LoadReportingService_StreamLoadStatsClient, error)
   364  }
   365  
   366  type loadReportingServiceClient struct {
   367  	cc grpc.ClientConnInterface
   368  }
   369  
   370  func NewLoadReportingServiceClient(cc grpc.ClientConnInterface) LoadReportingServiceClient {
   371  	return &loadReportingServiceClient{cc}
   372  }
   373  
   374  func (c *loadReportingServiceClient) StreamLoadStats(ctx context.Context, opts ...grpc.CallOption) (LoadReportingService_StreamLoadStatsClient, error) {
   375  	stream, err := c.cc.NewStream(ctx, &_LoadReportingService_serviceDesc.Streams[0], "/envoy.service.load_stats.v2.LoadReportingService/StreamLoadStats", opts...)
   376  	if err != nil {
   377  		return nil, err
   378  	}
   379  	x := &loadReportingServiceStreamLoadStatsClient{stream}
   380  	return x, nil
   381  }
   382  
   383  type LoadReportingService_StreamLoadStatsClient interface {
   384  	Send(*LoadStatsRequest) error
   385  	Recv() (*LoadStatsResponse, error)
   386  	grpc.ClientStream
   387  }
   388  
   389  type loadReportingServiceStreamLoadStatsClient struct {
   390  	grpc.ClientStream
   391  }
   392  
   393  func (x *loadReportingServiceStreamLoadStatsClient) Send(m *LoadStatsRequest) error {
   394  	return x.ClientStream.SendMsg(m)
   395  }
   396  
   397  func (x *loadReportingServiceStreamLoadStatsClient) Recv() (*LoadStatsResponse, error) {
   398  	m := new(LoadStatsResponse)
   399  	if err := x.ClientStream.RecvMsg(m); err != nil {
   400  		return nil, err
   401  	}
   402  	return m, nil
   403  }
   404  
   405  // LoadReportingServiceServer is the server API for LoadReportingService service.
   406  type LoadReportingServiceServer interface {
   407  	// Advanced API to allow for multi-dimensional load balancing by remote
   408  	// server. For receiving LB assignments, the steps are:
   409  	// 1, The management server is configured with per cluster/zone/load metric
   410  	//    capacity configuration. The capacity configuration definition is
   411  	//    outside of the scope of this document.
   412  	// 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters
   413  	//    to balance.
   414  	//
   415  	// Independently, Envoy will initiate a StreamLoadStats bidi stream with a
   416  	// management server:
   417  	// 1. Once a connection establishes, the management server publishes a
   418  	//    LoadStatsResponse for all clusters it is interested in learning load
   419  	//    stats about.
   420  	// 2. For each cluster, Envoy load balances incoming traffic to upstream hosts
   421  	//    based on per-zone weights and/or per-instance weights (if specified)
   422  	//    based on intra-zone LbPolicy. This information comes from the above
   423  	//    {Stream,Fetch}Endpoints.
   424  	// 3. When upstream hosts reply, they optionally add header <define header
   425  	//    name> with ASCII representation of EndpointLoadMetricStats.
   426  	// 4. Envoy aggregates load reports over the period of time given to it in
   427  	//    LoadStatsResponse.load_reporting_interval. This includes aggregation
   428  	//    stats Envoy maintains by itself (total_requests, rpc_errors etc.) as
   429  	//    well as load metrics from upstream hosts.
   430  	// 5. When the timer of load_reporting_interval expires, Envoy sends new
   431  	//    LoadStatsRequest filled with load reports for each cluster.
   432  	// 6. The management server uses the load reports from all reported Envoys
   433  	//    from around the world, computes global assignment and prepares traffic
   434  	//    assignment destined for each zone Envoys are located in. Goto 2.
   435  	StreamLoadStats(LoadReportingService_StreamLoadStatsServer) error
   436  }
   437  
   438  // UnimplementedLoadReportingServiceServer can be embedded to have forward compatible implementations.
   439  type UnimplementedLoadReportingServiceServer struct {
   440  }
   441  
   442  func (*UnimplementedLoadReportingServiceServer) StreamLoadStats(LoadReportingService_StreamLoadStatsServer) error {
   443  	return status.Errorf(codes.Unimplemented, "method StreamLoadStats not implemented")
   444  }
   445  
   446  func RegisterLoadReportingServiceServer(s *grpc.Server, srv LoadReportingServiceServer) {
   447  	s.RegisterService(&_LoadReportingService_serviceDesc, srv)
   448  }
   449  
   450  func _LoadReportingService_StreamLoadStats_Handler(srv interface{}, stream grpc.ServerStream) error {
   451  	return srv.(LoadReportingServiceServer).StreamLoadStats(&loadReportingServiceStreamLoadStatsServer{stream})
   452  }
   453  
   454  type LoadReportingService_StreamLoadStatsServer interface {
   455  	Send(*LoadStatsResponse) error
   456  	Recv() (*LoadStatsRequest, error)
   457  	grpc.ServerStream
   458  }
   459  
   460  type loadReportingServiceStreamLoadStatsServer struct {
   461  	grpc.ServerStream
   462  }
   463  
   464  func (x *loadReportingServiceStreamLoadStatsServer) Send(m *LoadStatsResponse) error {
   465  	return x.ServerStream.SendMsg(m)
   466  }
   467  
   468  func (x *loadReportingServiceStreamLoadStatsServer) Recv() (*LoadStatsRequest, error) {
   469  	m := new(LoadStatsRequest)
   470  	if err := x.ServerStream.RecvMsg(m); err != nil {
   471  		return nil, err
   472  	}
   473  	return m, nil
   474  }
   475  
   476  var _LoadReportingService_serviceDesc = grpc.ServiceDesc{
   477  	ServiceName: "envoy.service.load_stats.v2.LoadReportingService",
   478  	HandlerType: (*LoadReportingServiceServer)(nil),
   479  	Methods:     []grpc.MethodDesc{},
   480  	Streams: []grpc.StreamDesc{
   481  		{
   482  			StreamName:    "StreamLoadStats",
   483  			Handler:       _LoadReportingService_StreamLoadStats_Handler,
   484  			ServerStreams: true,
   485  			ClientStreams: true,
   486  		},
   487  	},
   488  	Metadata: "envoy/service/load_stats/v2/lrs.proto",
   489  }
   490  

View as plain text