Documentation
¶
Overview ¶
Package routing contains routing constants and utilities shared between the EPP/Inference-Scheduler and the Routing Sidecar.
Index ¶
Constants ¶
const ( // PrefillEndpointHeader is the header name used to indicate Prefill worker <ip:port> PrefillEndpointHeader = "x-prefiller-host-port" // EncoderEndpointsHeader is the header name used to indicate Encoder workers <ip:port> list EncoderEndpointsHeader = "x-encoder-hosts-ports" // DataParallelEndpointHeader is the header name used to indicate the worker <ip:port> for Data Parallel DataParallelEndpointHeader = "x-data-parallel-host-port" // InferencePoolAPIGroup is the default InferencePool API group InferencePoolAPIGroup = "inference.networking.k8s.io" // PreferHeader is the standard HTTP "Prefer" header (RFC 7240). EPP // receives header keys lowercased. PreferHeader = "prefer" // PreferIfAvailable is the preference token the coordinator sets to mark a // request as a speculative early-decode attempt: route to a decode worker // only if its KV cache already covers the prompt (at least partially); otherwise EPP surfaces // 412 Precondition Failed so the coordinator restarts the pipeline. PreferIfAvailable = "if-available" )
Variables ¶
This section is empty.
Functions ¶
func IsConditionalDecode ¶
IsConditionalDecode reports whether the request headers carry the "Prefer: if-available" preference (see PreferIfAvailable for semantics).
Per RFC 7240 the Prefer header value is a comma-separated list of preference tokens, each with optional ";"-delimited parameters. This function matches the bare "if-available" token case-insensitively, ignoring surrounding whitespace, parameters, and any other tokens that may appear alongside it.
func StripScheme ¶
StripScheme removes the scheme from an endpoint URL, returning host:port. This is useful for gRPC clients that expect host:port format only.
Types ¶
This section is empty.