Added last_handshake_time fields to UAPI

This commit is contained in:
Mathias Hall-Andersen
2017-07-18 15:22:56 +02:00
parent bd6027a4d5
commit 18714fc4a4
5 changed files with 23 additions and 7 deletions

View File

@@ -19,9 +19,12 @@ type Peer struct {
keyPairs KeyPairs
handshake Handshake
device *Device
txBytes uint64
rxBytes uint64
time struct {
stats struct {
txBytes uint64 // bytes send to peer (endpoint)
rxBytes uint64 // bytes received from peer
lastHandshakeNano int64 // nano seconds since epoch
}
time struct {
mutex sync.RWMutex
lastSend time.Time // last send message
lastHandshake time.Time // last completed handshake