MCPcopy
hub / github.com/canopy-network/canopy / set

Method set

p2p/set.go:339–339  ·  view source on GitHub ↗

map based CRUD operations below

(p *Peer)

Source from the content-addressed store, hash-verified

337
338// map based CRUD operations below
339func (ps *PeerSet) set(p *Peer) { ps.m[lib.BytesToString(p.Address.PublicKey)] = p }
340func (ps *PeerSet) del(publicKey []byte) { delete(ps.m, lib.BytesToString(publicKey)) }
341func (ps *PeerSet) get(publicKey []byte) (*Peer, lib.ErrorI) {
342 pub := lib.BytesToString(publicKey)

Callers 2

AddMethod · 0.95
sendToPluginAsyncMethod · 0.45

Calls 1

BytesToStringFunction · 0.92

Tested by

no test coverage detected