package weight

Import Path
	google.golang.org/grpc/internal/balancer/weight (on go.dev)

Dependency Relation
	imports 2 packages, and imported by one package

Involved Source Files Package weight contains utilities to manage endpoint weights. Weights are used by LB policies such as ringhash to distribute load across multiple endpoints.
Package-Level Type Names (only one)
/* sort by: | */
EndpointInfo will be stored in the Attributes field of Endpoints in order to use the ringhash balancer. Weight uint32 Equal allows the values to be compared by Attributes.Equal. String returns a human-readable representation of EndpointInfo. This method is intended for logging, testing, and debugging purposes only. Do not rely on the output format, as it is not guaranteed to remain stable. EndpointInfo : expvar.Var EndpointInfo : fmt.Stringer func FromEndpoint(endpoint resolver.Endpoint) EndpointInfo func Set(endpoint resolver.Endpoint, epInfo EndpointInfo) resolver.Endpoint
Package-Level Functions (total 2)
FromEndpoint returns the EndpointInfo stored in the Attributes field of an endpoint. It returns an empty EndpointInfo if attribute is not found.
Set returns a copy of endpoint in which the Attributes field is updated with EndpointInfo.