MCPcopy
hub / github.com/loong/go-concurrency-exercises / NewSessionManager

Function NewSessionManager

5-session-cleaner/main.go:37–43  ·  view source on GitHub ↗

NewSessionManager creates a new sessionManager

()

Source from the content-addressed store, hash-verified

35
36// NewSessionManager creates a new sessionManager
37func NewSessionManager() *SessionManager {
38 m := &SessionManager{
39 sessions: make(map[string]Session),
40 }
41
42 return m
43}
44
45// CreateSession creates a new session and returns the sessionID
46func (m *SessionManager) CreateSession() (string, error) {

Callers 4

mainFunction · 0.85

Calls

no outgoing calls