MCPcopy Create free account
hub / github.com/aurora-develop/aurora / NewSessionManager

Function NewSessionManager

initialize/session_manager.go:25–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23const defaultSessionTTL = 30 * time.Minute
24
25func NewSessionManager() *SessionManager {
26 sm := &SessionManager{
27 sessions: make(map[string]*sessionEntry),
28 ttl: defaultSessionTTL,
29 }
30 go sm.cleanupLoop()
31 return sm
32}
33
34// Get 根据 conversationID 获取缓存的 ChatClientState。
35// 不存在时返回 nil;调用方拿到 conversationID 后再调用 Register 注册新状态。

Callers 1

NewHandleFunction · 0.85

Calls 1

cleanupLoopMethod · 0.95

Tested by

no test coverage detected