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

Method GetEmailMap

backend/wireguard/peer_store.go:143–152  ·  view source on GitHub ↗

GetEmailMap returns a completely decoupled, point-in-time map of publicKey -> email. Replaces the over-engineered emailByKeySnapshotCache.

()

Source from the content-addressed store, hash-verified

141// GetEmailMap returns a completely decoupled, point-in-time map of publicKey -> email.
142// Replaces the over-engineered emailByKeySnapshotCache.
143func (ps *PeerStore) GetEmailMap() map[string]string {
144 ps.mu.RLock()
145 defer ps.mu.RUnlock()
146
147 snapshot := make(map[string]string, len(ps.peers))
148 for key, peer := range ps.peers {
149 snapshot[key] = peer.Email
150 }
151 return snapshot
152}

Calls

no outgoing calls