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

Function wireGuardPeerStatsProto

core/ipc_handler.go:319–327  ·  view source on GitHub ↗
(stat device.PeerStatus)

Source from the content-addressed store, hash-verified

317}
318
319func wireGuardPeerStatsProto(stat device.PeerStatus) *protocol.WireGuardPeerStats {
320 return &protocol.WireGuardPeerStats{
321 LatestHandshakeUnix: stat.LatestHandshakeTime().UnixNano(),
322 TxBytes: stat.TxBytes,
323 RxBytes: stat.RxBytes,
324 PersistentKeepaliveInterval: stat.PersistentKeepaliveInterval,
325 Endpoint: &stat.Endpoint,
326 }
327}
328
329func sourceProto(source state.Source) *protocol.Source {
330 return &protocol.Source{

Callers 1

buildNeighboursFunction · 0.85

Calls 1

LatestHandshakeTimeMethod · 0.80

Tested by

no test coverage detected