v2

package
v0.0.0-...-c645305 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_envoy_service_load_stats_v2_lrs_proto protoreflect.FileDescriptor
View Source
var LoadReportingService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "envoy.service.load_stats.v2.LoadReportingService",
	HandlerType: (*LoadReportingServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamLoadStats",
			Handler:       _LoadReportingService_StreamLoadStats_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "envoy/service/load_stats/v2/lrs.proto",
}

LoadReportingService_ServiceDesc is the grpc.ServiceDesc for LoadReportingService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterLoadReportingServiceServer

func RegisterLoadReportingServiceServer(s grpc.ServiceRegistrar, srv LoadReportingServiceServer)

Types

type ClusterStats

type ClusterStats struct {

	// The name of the cluster.
	ClusterName string `protobuf:"bytes,1,opt,name=cluster_name,json=clusterName,proto3" json:"cluster_name,omitempty"`
	// The eds_cluster_config service_name of the cluster.
	// It's possible that two clusters send the same service_name to EDS,
	// in that case, the management server is supposed to do aggregation on the load reports.
	ClusterServiceName string `protobuf:"bytes,6,opt,name=cluster_service_name,json=clusterServiceName,proto3" json:"cluster_service_name,omitempty"`
	// Need at least one.
	UpstreamLocalityStats []*UpstreamLocalityStats `` /* 126-byte string literal not displayed */
	// Cluster-level stats such as total_successful_requests may be computed by
	// summing upstream_locality_stats. In addition, below there are additional
	// cluster-wide stats.
	//
	// The total number of dropped requests. This covers requests
	// deliberately dropped by the drop_overload policy and circuit breaking.
	TotalDroppedRequests uint64 `protobuf:"varint,3,opt,name=total_dropped_requests,json=totalDroppedRequests,proto3" json:"total_dropped_requests,omitempty"`
	// Information about deliberately dropped requests for each category specified
	// in the DropOverload policy.
	DroppedRequests []*ClusterStats_DroppedRequests `protobuf:"bytes,5,rep,name=dropped_requests,json=droppedRequests,proto3" json:"dropped_requests,omitempty"`
	// Period over which the actual load report occurred. This will be guaranteed to include every
	// request reported. Due to system load and delays between the “LoadStatsRequest“ sent from Envoy
	// and the “LoadStatsResponse“ message sent from the management server, this may be longer than
	// the requested load reporting interval in the “LoadStatsResponse“.
	LoadReportInterval *duration.Duration `protobuf:"bytes,4,opt,name=load_report_interval,json=loadReportInterval,proto3" json:"load_report_interval,omitempty"`
	// contains filtered or unexported fields
}

Per cluster load stats. Envoy reports these stats a management server in a :ref:`LoadStatsRequest<envoy_v3_api_msg_service.load_stats.v3.LoadStatsRequest>` Next ID: 7 [#next-free-field: 7]

func (*ClusterStats) Descriptor deprecated

func (*ClusterStats) Descriptor() ([]byte, []int)

Deprecated: Use ClusterStats.ProtoReflect.Descriptor instead.

func (*ClusterStats) GetClusterName

func (x *ClusterStats) GetClusterName() string

func (*ClusterStats) GetClusterServiceName

func (x *ClusterStats) GetClusterServiceName() string

func (*ClusterStats) GetDroppedRequests

func (x *ClusterStats) GetDroppedRequests() []*ClusterStats_DroppedRequests

func (*ClusterStats) GetLoadReportInterval

func (x *ClusterStats) GetLoadReportInterval() *duration.Duration

func (*ClusterStats) GetTotalDroppedRequests

func (x *ClusterStats) GetTotalDroppedRequests() uint64

func (*ClusterStats) GetUpstreamLocalityStats

func (x *ClusterStats) GetUpstreamLocalityStats() []*UpstreamLocalityStats

func (*ClusterStats) ProtoMessage

func (*ClusterStats) ProtoMessage()

func (*ClusterStats) ProtoReflect

func (x *ClusterStats) ProtoReflect() protoreflect.Message

func (*ClusterStats) Reset

func (x *ClusterStats) Reset()

func (*ClusterStats) String

func (x *ClusterStats) String() string

type ClusterStats_DroppedRequests

type ClusterStats_DroppedRequests struct {

	// Identifier for the policy specifying the drop.
	Category string `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"`
	// Total number of deliberately dropped requests for the category.
	DroppedCount uint64 `protobuf:"varint,2,opt,name=dropped_count,json=droppedCount,proto3" json:"dropped_count,omitempty"`
	// contains filtered or unexported fields
}

func (*ClusterStats_DroppedRequests) Descriptor deprecated

func (*ClusterStats_DroppedRequests) Descriptor() ([]byte, []int)

Deprecated: Use ClusterStats_DroppedRequests.ProtoReflect.Descriptor instead.

func (*ClusterStats_DroppedRequests) GetCategory

func (x *ClusterStats_DroppedRequests) GetCategory() string

func (*ClusterStats_DroppedRequests) GetDroppedCount

func (x *ClusterStats_DroppedRequests) GetDroppedCount() uint64

func (*ClusterStats_DroppedRequests) ProtoMessage

func (*ClusterStats_DroppedRequests) ProtoMessage()

func (*ClusterStats_DroppedRequests) ProtoReflect

func (*ClusterStats_DroppedRequests) Reset

func (x *ClusterStats_DroppedRequests) Reset()

func (*ClusterStats_DroppedRequests) String

type EndpointLoadMetricStats

type EndpointLoadMetricStats struct {

	// Name of the metric; may be empty.
	MetricName string `protobuf:"bytes,1,opt,name=metric_name,json=metricName,proto3" json:"metric_name,omitempty"`
	// Number of calls that finished and included this metric.
	NumRequestsFinishedWithMetric uint64 `` /* 155-byte string literal not displayed */
	// Sum of metric values across all calls that finished with this metric for
	// load_reporting_interval.
	TotalMetricValue float64 `protobuf:"fixed64,3,opt,name=total_metric_value,json=totalMetricValue,proto3" json:"total_metric_value,omitempty"`
	// contains filtered or unexported fields
}

func (*EndpointLoadMetricStats) Descriptor deprecated

func (*EndpointLoadMetricStats) Descriptor() ([]byte, []int)

Deprecated: Use EndpointLoadMetricStats.ProtoReflect.Descriptor instead.

func (*EndpointLoadMetricStats) GetMetricName

func (x *EndpointLoadMetricStats) GetMetricName() string

func (*EndpointLoadMetricStats) GetNumRequestsFinishedWithMetric

func (x *EndpointLoadMetricStats) GetNumRequestsFinishedWithMetric() uint64

func (*EndpointLoadMetricStats) GetTotalMetricValue

func (x *EndpointLoadMetricStats) GetTotalMetricValue() float64

func (*EndpointLoadMetricStats) ProtoMessage

func (*EndpointLoadMetricStats) ProtoMessage()

func (*EndpointLoadMetricStats) ProtoReflect

func (x *EndpointLoadMetricStats) ProtoReflect() protoreflect.Message

func (*EndpointLoadMetricStats) Reset

func (x *EndpointLoadMetricStats) Reset()

func (*EndpointLoadMetricStats) String

func (x *EndpointLoadMetricStats) String() string

type LoadReportingServiceClient

type LoadReportingServiceClient interface {
	// Advanced API to allow for multi-dimensional load balancing by remote
	// server. For receiving LB assignments, the steps are:
	// 1, The management server is configured with per cluster/zone/load metric
	//    capacity configuration. The capacity configuration definition is
	//    outside of the scope of this document.
	// 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters
	//    to balance.
	//
	// Independently, Envoy will initiate a StreamLoadStats bidi stream with a
	// management server:
	// 1. Once a connection establishes, the management server publishes a
	//    LoadStatsResponse for all clusters it is interested in learning load
	//    stats about.
	// 2. For each cluster, Envoy load balances incoming traffic to upstream hosts
	//    based on per-zone weights and/or per-instance weights (if specified)
	//    based on intra-zone LbPolicy. This information comes from the above
	//    {Stream,Fetch}Endpoints.
	// 3. When upstream hosts reply, they optionally add header <define header
	//    name> with ASCII representation of EndpointLoadMetricStats.
	// 4. Envoy aggregates load reports over the period of time given to it in
	//    LoadStatsResponse.load_reporting_interval. This includes aggregation
	//    stats Envoy maintains by itself (total_requests, rpc_errors etc.) as
	//    well as load metrics from upstream hosts.
	// 5. When the timer of load_reporting_interval expires, Envoy sends new
	//    LoadStatsRequest filled with load reports for each cluster.
	// 6. The management server uses the load reports from all reported Envoys
	//    from around the world, computes global assignment and prepares traffic
	//    assignment destined for each zone Envoys are located in. Goto 2.
	StreamLoadStats(ctx context.Context, opts ...grpc.CallOption) (LoadReportingService_StreamLoadStatsClient, error)
}

LoadReportingServiceClient is the client API for LoadReportingService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type LoadReportingServiceServer

type LoadReportingServiceServer interface {
	// Advanced API to allow for multi-dimensional load balancing by remote
	// server. For receiving LB assignments, the steps are:
	// 1, The management server is configured with per cluster/zone/load metric
	//    capacity configuration. The capacity configuration definition is
	//    outside of the scope of this document.
	// 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters
	//    to balance.
	//
	// Independently, Envoy will initiate a StreamLoadStats bidi stream with a
	// management server:
	// 1. Once a connection establishes, the management server publishes a
	//    LoadStatsResponse for all clusters it is interested in learning load
	//    stats about.
	// 2. For each cluster, Envoy load balances incoming traffic to upstream hosts
	//    based on per-zone weights and/or per-instance weights (if specified)
	//    based on intra-zone LbPolicy. This information comes from the above
	//    {Stream,Fetch}Endpoints.
	// 3. When upstream hosts reply, they optionally add header <define header
	//    name> with ASCII representation of EndpointLoadMetricStats.
	// 4. Envoy aggregates load reports over the period of time given to it in
	//    LoadStatsResponse.load_reporting_interval. This includes aggregation
	//    stats Envoy maintains by itself (total_requests, rpc_errors etc.) as
	//    well as load metrics from upstream hosts.
	// 5. When the timer of load_reporting_interval expires, Envoy sends new
	//    LoadStatsRequest filled with load reports for each cluster.
	// 6. The management server uses the load reports from all reported Envoys
	//    from around the world, computes global assignment and prepares traffic
	//    assignment destined for each zone Envoys are located in. Goto 2.
	StreamLoadStats(LoadReportingService_StreamLoadStatsServer) error
}

LoadReportingServiceServer is the server API for LoadReportingService service. All implementations should embed UnimplementedLoadReportingServiceServer for forward compatibility

type LoadReportingService_StreamLoadStatsClient

type LoadReportingService_StreamLoadStatsClient interface {
	Send(*LoadStatsRequest) error
	Recv() (*LoadStatsResponse, error)
	grpc.ClientStream
}

type LoadReportingService_StreamLoadStatsServer

type LoadReportingService_StreamLoadStatsServer interface {
	Send(*LoadStatsResponse) error
	Recv() (*LoadStatsRequest, error)
	grpc.ServerStream
}

type LoadStatsRequest

type LoadStatsRequest struct {

	// Node identifier for Envoy instance.
	Node *xds.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
	// A list of load stats to report.
	ClusterStats []*ClusterStats `protobuf:"bytes,2,rep,name=cluster_stats,json=clusterStats,proto3" json:"cluster_stats,omitempty"`
	// contains filtered or unexported fields
}

A load report Envoy sends to the management server. [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs.

func (*LoadStatsRequest) Descriptor deprecated

func (*LoadStatsRequest) Descriptor() ([]byte, []int)

Deprecated: Use LoadStatsRequest.ProtoReflect.Descriptor instead.

func (*LoadStatsRequest) GetClusterStats

func (x *LoadStatsRequest) GetClusterStats() []*ClusterStats

func (*LoadStatsRequest) GetNode

func (x *LoadStatsRequest) GetNode() *xds.Node

func (*LoadStatsRequest) ProtoMessage

func (*LoadStatsRequest) ProtoMessage()

func (*LoadStatsRequest) ProtoReflect

func (x *LoadStatsRequest) ProtoReflect() protoreflect.Message

func (*LoadStatsRequest) Reset

func (x *LoadStatsRequest) Reset()

func (*LoadStatsRequest) String

func (x *LoadStatsRequest) String() string

type LoadStatsResponse

type LoadStatsResponse struct {

	// Clusters to report stats for.
	// Not populated if *send_all_clusters* is true.
	Clusters []string `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"`
	// If true, the client should send all clusters it knows about.
	// Only clients that advertise the "envoy.lrs.supports_send_all_clusters" capability in their
	// :ref:`client_features<envoy_api_field_core.Node.client_features>` field will honor this field.
	SendAllClusters bool `protobuf:"varint,4,opt,name=send_all_clusters,json=sendAllClusters,proto3" json:"send_all_clusters,omitempty"`
	// The minimum interval of time to collect stats over. This is only a minimum for two reasons:
	//  1. There may be some delay from when the timer fires until stats sampling occurs.
	//  2. For clusters that were already feature in the previous *LoadStatsResponse*, any traffic
	//     that is observed in between the corresponding previous *LoadStatsRequest* and this
	//     *LoadStatsResponse* will also be accumulated and billed to the cluster. This avoids a period
	//     of inobservability that might otherwise exists between the messages. New clusters are not
	//     subject to this consideration.
	LoadReportingInterval *duration.Duration `` /* 126-byte string literal not displayed */
	// Set to *true* if the management server supports endpoint granularity
	// report.
	ReportEndpointGranularity bool `` /* 139-byte string literal not displayed */
	// contains filtered or unexported fields
}

The management server sends envoy a LoadStatsResponse with all clusters it is interested in learning load stats about. [#not-implemented-hide:] Not configuration. TBD how to doc proto APIs.

func (*LoadStatsResponse) Descriptor deprecated

func (*LoadStatsResponse) Descriptor() ([]byte, []int)

Deprecated: Use LoadStatsResponse.ProtoReflect.Descriptor instead.

func (*LoadStatsResponse) GetClusters

func (x *LoadStatsResponse) GetClusters() []string

func (*LoadStatsResponse) GetLoadReportingInterval

func (x *LoadStatsResponse) GetLoadReportingInterval() *duration.Duration

func (*LoadStatsResponse) GetReportEndpointGranularity

func (x *LoadStatsResponse) GetReportEndpointGranularity() bool

func (*LoadStatsResponse) GetSendAllClusters

func (x *LoadStatsResponse) GetSendAllClusters() bool

func (*LoadStatsResponse) ProtoMessage

func (*LoadStatsResponse) ProtoMessage()

func (*LoadStatsResponse) ProtoReflect

func (x *LoadStatsResponse) ProtoReflect() protoreflect.Message

func (*LoadStatsResponse) Reset

func (x *LoadStatsResponse) Reset()

func (*LoadStatsResponse) String

func (x *LoadStatsResponse) String() string

type UnimplementedLoadReportingServiceServer

type UnimplementedLoadReportingServiceServer struct {
}

UnimplementedLoadReportingServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedLoadReportingServiceServer) StreamLoadStats

type UnsafeLoadReportingServiceServer

type UnsafeLoadReportingServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeLoadReportingServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LoadReportingServiceServer will result in compilation errors.

type UpstreamEndpointStats

type UpstreamEndpointStats struct {

	// Upstream host address.
	Address *xds.Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// Opaque and implementation dependent metadata of the
	// endpoint. Envoy will pass this directly to the management server.
	Metadata *structpb.Struct `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// The total number of requests successfully completed by the endpoints in the
	// locality. These include non-5xx responses for HTTP, where errors
	// originate at the client and the endpoint responded successfully. For gRPC,
	// the grpc-status values are those not covered by total_error_requests below.
	TotalSuccessfulRequests uint64 `` /* 133-byte string literal not displayed */
	// The total number of unfinished requests for this endpoint.
	TotalRequestsInProgress uint64 `` /* 135-byte string literal not displayed */
	// The total number of requests that failed due to errors at the endpoint.
	// For HTTP these are responses with 5xx status codes and for gRPC the
	// grpc-status values:
	//
	//   - DeadlineExceeded
	//   - Unimplemented
	//   - Internal
	//   - Unavailable
	//   - Unknown
	//   - DataLoss
	TotalErrorRequests uint64 `protobuf:"varint,4,opt,name=total_error_requests,json=totalErrorRequests,proto3" json:"total_error_requests,omitempty"`
	// The total number of requests that were issued to this endpoint
	// since the last report. A single TCP connection, HTTP or gRPC
	// request or stream is counted as one request.
	TotalIssuedRequests uint64 `protobuf:"varint,7,opt,name=total_issued_requests,json=totalIssuedRequests,proto3" json:"total_issued_requests,omitempty"`
	// Stats for multi-dimensional load balancing.
	LoadMetricStats []*EndpointLoadMetricStats `protobuf:"bytes,5,rep,name=load_metric_stats,json=loadMetricStats,proto3" json:"load_metric_stats,omitempty"`
	// contains filtered or unexported fields
}

[#next-free-field: 8]

func (*UpstreamEndpointStats) Descriptor deprecated

func (*UpstreamEndpointStats) Descriptor() ([]byte, []int)

Deprecated: Use UpstreamEndpointStats.ProtoReflect.Descriptor instead.

func (*UpstreamEndpointStats) GetAddress

func (x *UpstreamEndpointStats) GetAddress() *xds.Address

func (*UpstreamEndpointStats) GetLoadMetricStats

func (x *UpstreamEndpointStats) GetLoadMetricStats() []*EndpointLoadMetricStats

func (*UpstreamEndpointStats) GetMetadata

func (x *UpstreamEndpointStats) GetMetadata() *structpb.Struct

func (*UpstreamEndpointStats) GetTotalErrorRequests

func (x *UpstreamEndpointStats) GetTotalErrorRequests() uint64

func (*UpstreamEndpointStats) GetTotalIssuedRequests

func (x *UpstreamEndpointStats) GetTotalIssuedRequests() uint64

func (*UpstreamEndpointStats) GetTotalRequestsInProgress

func (x *UpstreamEndpointStats) GetTotalRequestsInProgress() uint64

func (*UpstreamEndpointStats) GetTotalSuccessfulRequests

func (x *UpstreamEndpointStats) GetTotalSuccessfulRequests() uint64

func (*UpstreamEndpointStats) ProtoMessage

func (*UpstreamEndpointStats) ProtoMessage()

func (*UpstreamEndpointStats) ProtoReflect

func (x *UpstreamEndpointStats) ProtoReflect() protoreflect.Message

func (*UpstreamEndpointStats) Reset

func (x *UpstreamEndpointStats) Reset()

func (*UpstreamEndpointStats) String

func (x *UpstreamEndpointStats) String() string

type UpstreamLocalityStats

type UpstreamLocalityStats struct {

	// Name of zone, region and optionally endpoint group these metrics were
	// collected from. Zone and region names could be empty if unknown.
	Locality *xds.Locality `protobuf:"bytes,1,opt,name=locality,proto3" json:"locality,omitempty"`
	// The total number of requests successfully completed by the endpoints in the
	// locality.
	TotalSuccessfulRequests uint64 `` /* 133-byte string literal not displayed */
	// The total number of unfinished requests
	TotalRequestsInProgress uint64 `` /* 135-byte string literal not displayed */
	// The total number of requests that failed due to errors at the endpoint,
	// aggregated over all endpoints in the locality.
	TotalErrorRequests uint64 `protobuf:"varint,4,opt,name=total_error_requests,json=totalErrorRequests,proto3" json:"total_error_requests,omitempty"`
	// The total number of requests that were issued by this Envoy since
	// the last report. This information is aggregated over all the
	// upstream endpoints in the locality.
	TotalIssuedRequests uint64 `protobuf:"varint,8,opt,name=total_issued_requests,json=totalIssuedRequests,proto3" json:"total_issued_requests,omitempty"`
	// Stats for multi-dimensional load balancing.
	LoadMetricStats []*EndpointLoadMetricStats `protobuf:"bytes,5,rep,name=load_metric_stats,json=loadMetricStats,proto3" json:"load_metric_stats,omitempty"`
	// Endpoint granularity stats information for this locality. This information
	// is populated if the Server requests it by setting
	// :ref:`LoadStatsResponse.report_endpoint_granularity<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.report_endpoint_granularity>`.
	UpstreamEndpointStats []*UpstreamEndpointStats `` /* 126-byte string literal not displayed */
	// [#not-implemented-hide:] The priority of the endpoint group these metrics
	// were collected from.
	Priority uint32 `protobuf:"varint,6,opt,name=priority,proto3" json:"priority,omitempty"`
	// contains filtered or unexported fields
}

These are stats Envoy reports to the management server at a frequency defined by :ref:`LoadStatsResponse.load_reporting_interval<envoy_v3_api_field_service.load_stats.v3.LoadStatsResponse.load_reporting_interval>`. Stats per upstream region/zone and optionally per subzone. [#next-free-field: 9]

func (*UpstreamLocalityStats) Descriptor deprecated

func (*UpstreamLocalityStats) Descriptor() ([]byte, []int)

Deprecated: Use UpstreamLocalityStats.ProtoReflect.Descriptor instead.

func (*UpstreamLocalityStats) GetLoadMetricStats

func (x *UpstreamLocalityStats) GetLoadMetricStats() []*EndpointLoadMetricStats

func (*UpstreamLocalityStats) GetLocality

func (x *UpstreamLocalityStats) GetLocality() *xds.Locality

func (*UpstreamLocalityStats) GetPriority

func (x *UpstreamLocalityStats) GetPriority() uint32

func (*UpstreamLocalityStats) GetTotalErrorRequests

func (x *UpstreamLocalityStats) GetTotalErrorRequests() uint64

func (*UpstreamLocalityStats) GetTotalIssuedRequests

func (x *UpstreamLocalityStats) GetTotalIssuedRequests() uint64

func (*UpstreamLocalityStats) GetTotalRequestsInProgress

func (x *UpstreamLocalityStats) GetTotalRequestsInProgress() uint64

func (*UpstreamLocalityStats) GetTotalSuccessfulRequests

func (x *UpstreamLocalityStats) GetTotalSuccessfulRequests() uint64

func (*UpstreamLocalityStats) GetUpstreamEndpointStats

func (x *UpstreamLocalityStats) GetUpstreamEndpointStats() []*UpstreamEndpointStats

func (*UpstreamLocalityStats) ProtoMessage

func (*UpstreamLocalityStats) ProtoMessage()

func (*UpstreamLocalityStats) ProtoReflect

func (x *UpstreamLocalityStats) ProtoReflect() protoreflect.Message

func (*UpstreamLocalityStats) Reset

func (x *UpstreamLocalityStats) Reset()

func (*UpstreamLocalityStats) String

func (x *UpstreamLocalityStats) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL