...

Source file src/github.com/datawire/ambassador/v2/pkg/api/envoy/service/load_stats/v3/lrs.pb.go

Documentation: github.com/datawire/ambassador/v2/pkg/api/envoy/service/load_stats/v3

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

View as plain text