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

Method SessionCountForWorker

controlplane/session_mgr.go:934–938  ·  view source on GitHub ↗

SessionCountForWorker returns the number of sessions on a specific worker.

(workerID int)

Source from the content-addressed store, hash-verified

932func (sm *SessionManager) SessionCountForWorker(workerID int) int {
933 sm.mu.RLock()
934 defer sm.mu.RUnlock()
935 return len(sm.byWorker[workerID])
936}
937
938// WorkerIDForPID returns the worker ID for a session, or -1 if not found.
939func (sm *SessionManager) WorkerIDForPID(pid int32) int {
940 sm.mu.RLock()
941 defer sm.mu.RUnlock()

Callers 1

stackForWorkerMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected