Documentation
¶
Overview ¶
Package session declares the SessionID attribute that carries per-request session identity for affinity scoring and filtering. The value is published once per request on the InferenceRequest attribute store.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var SessionIDDataKey = plugin.NewDataKey("SessionIDDataKey", sessionidconstants.SessionIDProducerType)
SessionIDDataKey identifies the session identifier published on the request attribute store. The default producer is the session-id-producer.
Functions ¶
This section is empty.
Types ¶
type SessionID ¶
type SessionID string
SessionID is the session identifier extracted from a request.
func ReadSessionID ¶
func ReadSessionID(r *fwksched.InferenceRequest) (SessionID, bool)
ReadSessionID returns the SessionID published by the default producer on the request attribute store, or "" and false if absent.
Consumers should use this helper rather than reading the attribute directly: it encapsulates both the key construction and the type assertion, so a future change of storage location or value type does not ripple through every reader.