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

Method GetByKey

backend/wireguard/peer_store.go:122–127  ·  view source on GitHub ↗

GetByKey returns a single peer by public key.

(publicKey string)

Source from the content-addressed store, hash-verified

120
121// GetByKey returns a single peer by public key.
122func (ps *PeerStore) GetByKey(publicKey string) *PeerInfo {
123 ps.mu.RLock()
124 defer ps.mu.RUnlock()
125
126 return clonePeerInfo(ps.peers[publicKey])
127}
128
129// GetAll returns all configured peers.
130func (ps *PeerStore) GetAll() []*PeerInfo {

Calls 1

clonePeerInfoFunction · 0.85