MCPcopy
hub / github.com/tinode/chat / NewSessionStore

Function NewSessionStore

server/sessionstore.go:265–277  ·  view source on GitHub ↗

NewSessionStore initializes a session store.

(lifetime time.Duration)

Source from the content-addressed store, hash-verified

263
264// NewSessionStore initializes a session store.
265func NewSessionStore(lifetime time.Duration) *SessionStore {
266 ss := &SessionStore{
267 lru: list.New(),
268 lifeTime: lifetime,
269
270 sessCache: make(map[string]*Session),
271 }
272
273 statsRegisterInt("LiveSessions")
274 statsRegisterInt("TotalSessions")
275
276 return ss
277}

Callers 1

mainFunction · 0.85

Calls 1

statsRegisterIntFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…