MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / GetConnectedClients

Method GetConnectedClients

pkg/api/group-client-manager.go:201–212  ·  view source on GitHub ↗

GetConnectedClients returns all currently connected profile clients.

()

Source from the content-addressed store, hash-verified

199
200// GetConnectedClients returns all currently connected profile clients.
201func (m *GroupClientManager) GetConnectedClients() []*ProfileClient {
202 m.mu.RLock()
203 defer m.mu.RUnlock()
204
205 connected := make([]*ProfileClient, 0, len(m.clients))
206 for _, pc := range m.clients {
207 if status, _ := pc.GetStatus(); status == ProfileStatusConnected {
208 connected = append(connected, pc)
209 }
210 }
211 return connected
212}
213
214// GetAllClients returns all clients regardless of status.
215func (m *GroupClientManager) GetAllClients() []*ProfileClient {

Callers 2

ExecuteOnAllProfilesMethod · 0.95

Calls 1

GetStatusMethod · 0.80

Tested by

no test coverage detected