MCPcopy Create free account
hub / github.com/encodeous/nylon / RemovePeer

Method RemovePeer

polyamide/device/device.go:367–376  ·  view source on GitHub ↗
(key NoisePublicKey)

Source from the content-addressed store, hash-verified

365}
366
367func (device *Device) RemovePeer(key NoisePublicKey) {
368 device.peers.Lock()
369 defer device.peers.Unlock()
370 // stop peer and remove from routing
371
372 peer, ok := device.peers.keyMap[key]
373 if ok {
374 removePeerLocked(device, peer, key)
375 }
376}
377
378func (device *Device) RemoveAllPeers() {
379 device.peers.Lock()

Callers 2

handlePeerLineMethod · 0.95
SyncWireGuardMethod · 0.80

Implementers 4

NativeTunpolyamide/tun/tun_linux.go
netTunpolyamide/tun/netstack/tun.go
chTunpolyamide/tun/tuntest/tuntest.go
fakeTUNDeviceSizedpolyamide/device/device_test.go

Calls 1

removePeerLockedFunction · 0.85

Tested by

no test coverage detected