grpcgoogle.golang.org/grpc/orca/internal Index | Files

package internal

import "google.golang.org/grpc/orca/internal"

Package internal contains orca-internal code, for testing purposes and to avoid polluting the godoc of the top-level orca package.

Index

Constants

const TrailerMetadataKey = "endpoint-load-metrics-bin"

TrailerMetadataKey is the key in which the per-call backend metrics are transmitted.

Variables

var AllowAnyMinReportingInterval any // func(*ServiceOptions)

AllowAnyMinReportingInterval prevents clamping of the MinReportingInterval configured via ServiceOptions, to a minimum of 30s.

For testing purposes only.

var DefaultBackoffFunc = ibackoff.DefaultExponential.Backoff

DefaultBackoffFunc is used by the producer to control its backoff behavior.

For testing purposes only.

Functions

func ToLoadReport

func ToLoadReport(md metadata.MD) (*v3orcapb.OrcaLoadReport, error)

ToLoadReport unmarshals a binary encoded [ORCA LoadReport] protobuf message from md and returns the corresponding struct. The load report is expected to be stored as the value for key "endpoint-load-metrics-bin".

If no load report was found in the provided metadata, if multiple load reports are found, or if the load report found cannot be parsed, an error is returned.

[ORCA LoadReport]: (https://github.com/cncf/xds/blob/main/xds/data/orca/v3/orca_load_report.proto#L15)

Source Files

internal.go

Version
v1.70.0 (latest)
Published
Jan 23, 2025
Platform
linux/amd64
Imports
6 packages
Last checked
16 hours ago

Tools for package owners.