Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GlobalManager = NewManager(45 * time.Minute)
Functions ¶
func DeriveSessionKey ¶
func DeriveSessionKey(r *http.Request, req *providers.ChatRequest) string
DeriveSessionKey generates a stable hash for a conversation turn
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) GetAffinity ¶
GetAffinity returns pinned account ID if still valid
func (*Manager) InvalidateAffinity ¶
InvalidateAffinity breaks affinity when account returns 429/401/403
func (*Manager) ListSessions ¶
func (m *Manager) ListSessions() []SessionRecord
func (*Manager) SetAffinity ¶
SetAffinity pins a session to a specific account
type SessionAffinity ¶
Click to show internal directories.
Click to hide internal directories.