load_statsv3

package
v0.0.0-...-cae1a60 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LoadReportingService_StreamLoadStats_FullMethodName = "/envoy.service.load_stats.v3.LoadReportingService/StreamLoadStats"
)

Variables

View Source
var File_envoy_service_load_stats_v3_lrs_proto protoreflect.FileDescriptor
View Source
var LoadReportingService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "envoy.service.load_stats.v3.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/v3/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 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 *v3.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
	// A list of load stats to report.
	ClusterStats []*v31.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.

func (*LoadStatsRequest) Descriptor deprecated

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

Deprecated: Use LoadStatsRequest.ProtoReflect.Descriptor instead.

func (*LoadStatsRequest) GetClusterStats

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

func (*LoadStatsRequest) GetNode

func (x *LoadStatsRequest) GetNode() *v3.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

func (*LoadStatsRequest) Validate

func (m *LoadStatsRequest) Validate() error

Validate checks the field values on LoadStatsRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*LoadStatsRequest) ValidateAll

func (m *LoadStatsRequest) ValidateAll() error

ValidateAll checks the field values on LoadStatsRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LoadStatsRequestMultiError, or nil if none found.

type LoadStatsRequestMultiError

type LoadStatsRequestMultiError []error

LoadStatsRequestMultiError is an error wrapping multiple validation errors returned by LoadStatsRequest.ValidateAll() if the designated constraints aren't met.

func (LoadStatsRequestMultiError) AllErrors

func (m LoadStatsRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LoadStatsRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type LoadStatsRequestValidationError

type LoadStatsRequestValidationError struct {
	// contains filtered or unexported fields
}

LoadStatsRequestValidationError is the validation error returned by LoadStatsRequest.Validate if the designated constraints aren't met.

func (LoadStatsRequestValidationError) Cause

Cause function returns cause value.

func (LoadStatsRequestValidationError) Error

Error satisfies the builtin error interface

func (LoadStatsRequestValidationError) ErrorName

ErrorName returns error name.

func (LoadStatsRequestValidationError) Field

Field function returns field value.

func (LoadStatsRequestValidationError) Key

Key function returns key value.

func (LoadStatsRequestValidationError) Reason

Reason function returns reason value.

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_v3_api_field_config.core.v3.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 *durationpb.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.

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() *durationpb.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

func (*LoadStatsResponse) Validate

func (m *LoadStatsResponse) Validate() error

Validate checks the field values on LoadStatsResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*LoadStatsResponse) ValidateAll

func (m *LoadStatsResponse) ValidateAll() error

ValidateAll checks the field values on LoadStatsResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in LoadStatsResponseMultiError, or nil if none found.

type LoadStatsResponseMultiError

type LoadStatsResponseMultiError []error

LoadStatsResponseMultiError is an error wrapping multiple validation errors returned by LoadStatsResponse.ValidateAll() if the designated constraints aren't met.

func (LoadStatsResponseMultiError) AllErrors

func (m LoadStatsResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (LoadStatsResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type LoadStatsResponseValidationError

type LoadStatsResponseValidationError struct {
	// contains filtered or unexported fields
}

LoadStatsResponseValidationError is the validation error returned by LoadStatsResponse.Validate if the designated constraints aren't met.

func (LoadStatsResponseValidationError) Cause

Cause function returns cause value.

func (LoadStatsResponseValidationError) Error

Error satisfies the builtin error interface

func (LoadStatsResponseValidationError) ErrorName

ErrorName returns error name.

func (LoadStatsResponseValidationError) Field

Field function returns field value.

func (LoadStatsResponseValidationError) Key

Key function returns key value.

func (LoadStatsResponseValidationError) Reason

Reason function returns reason value.

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.

Jump to

Keyboard shortcuts

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