MCPcopy Create free account
hub / github.com/PasarGuard/node / GetAll

Method GetAll

backend/wireguard/peer_store.go:130–139  ·  view source on GitHub ↗

GetAll returns all configured peers.

()

Source from the content-addressed store, hash-verified

128
129// GetAll returns all configured peers.
130func (ps *PeerStore) GetAll() []*PeerInfo {
131 ps.mu.RLock()
132 defer ps.mu.RUnlock()
133
134 result := make([]*PeerInfo, 0, len(ps.peers))
135 for _, peer := range ps.peers {
136 result = append(result, clonePeerInfo(peer))
137 }
138 return result
139}
140
141// GetEmailMap returns a completely decoupled, point-in-time map of publicKey -> email.
142// Replaces the over-engineered emailByKeySnapshotCache.

Callers 2

restartLockedMethod · 0.80

Calls 1

clonePeerInfoFunction · 0.85

Tested by

no test coverage detected