session

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

README

Session Attributes

Per-request session identity used by affinity-aware scorers and filters.

SessionID

Holds the session identifier extracted from a request. Stored on the InferenceRequest attribute store (one entry per request, not per endpoint).

  • Key: SessionIDDataKey (default producer: session-id-producer)
  • Type: SessionID (string alias)
  • Reader helper: session.ReadSessionID(request) returns the value and a presence boolean. Consumers should prefer this over reading the attribute directly so the storage choice stays encapsulated.

Producers

  • session-id-producer (Request Control): extracts the session identifier from a configured request header or named cookie.

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

View Source
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL