Documentation ¶
Overview ¶
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 interface{} // 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)
Types ¶
This section is empty.