MCPcopy Create free account
hub / github.com/PostHog/duckgres / SessionCount

Method SessionCount

controlplane/session_mgr.go:927–931  ·  view source on GitHub ↗

SessionCount returns the number of active sessions.

()

Source from the content-addressed store, hash-verified

925func (sm *SessionManager) SessionCount() int {
926 sm.mu.RLock()
927 defer sm.mu.RUnlock()
928 return len(sm.sessions)
929}
930
931// SessionCountForWorker returns the number of sessions on a specific worker.
932func (sm *SessionManager) SessionCountForWorker(workerID int) int {
933 sm.mu.RLock()
934 defer sm.mu.RUnlock()

Calls

no outgoing calls