SessionCount returns the number of active sessions.
()
| 925 | func (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. |
| 932 | func (sm *SessionManager) SessionCountForWorker(workerID int) int { |
| 933 | sm.mu.RLock() |
| 934 | defer sm.mu.RUnlock() |
no outgoing calls