load_statsv3connect

package
v1.16.1-20240416201305... Latest Latest
Warning

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

Go to latest
Published: unknown License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LoadReportingServiceName is the fully-qualified name of the LoadReportingService service.
	LoadReportingServiceName = "envoy.service.load_stats.v3.LoadReportingService"
)
View Source
const (
	// LoadReportingServiceStreamLoadStatsProcedure is the fully-qualified name of the
	// LoadReportingService's StreamLoadStats RPC.
	LoadReportingServiceStreamLoadStatsProcedure = "/envoy.service.load_stats.v3.LoadReportingService/StreamLoadStats"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

Variables

This section is empty.

Functions

func NewLoadReportingServiceHandler

func NewLoadReportingServiceHandler(svc LoadReportingServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewLoadReportingServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

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(context.Context) *connect.BidiStreamForClient[v3.LoadStatsRequest, v3.LoadStatsResponse]
}

LoadReportingServiceClient is a client for the envoy.service.load_stats.v3.LoadReportingService service.

func NewLoadReportingServiceClient

func NewLoadReportingServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) LoadReportingServiceClient

NewLoadReportingServiceClient constructs a client for the envoy.service.load_stats.v3.LoadReportingService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type LoadReportingServiceHandler

type LoadReportingServiceHandler 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(context.Context, *connect.BidiStream[v3.LoadStatsRequest, v3.LoadStatsResponse]) error
}

LoadReportingServiceHandler is an implementation of the envoy.service.load_stats.v3.LoadReportingService service.

type UnimplementedLoadReportingServiceHandler

type UnimplementedLoadReportingServiceHandler struct{}

UnimplementedLoadReportingServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedLoadReportingServiceHandler) StreamLoadStats

Jump to

Keyboard shortcuts

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