5
0
mirror of https://github.com/cwinfo/yggdrasil-network.github.io.git synced 2024-11-09 01:40:26 +00:00

Uptime is float as time.Seconds returns a float64

See: https://golang.org/src/time/time.go?s=25778:25813#L792

I stumbled upon this when playing with the Admin API, example:
{
  "peers": {
    "<redacted>": {
      ...
      "uptime": 625.732186871
      ...
    },
    "<redacted>": {
      ...
      "uptime": 625.638570027
      ...
    }
  }
}
This commit is contained in:
William Wennerström 2020-03-09 22:26:48 +01:00
parent e4903fab8e
commit b44049797c
No known key found for this signature in database
GPG Key ID: E1382990BEDD319B

View File

@ -118,7 +118,7 @@ For each IPv6 address:
- `bytes_recvd` (`uint64`) contains the number of bytes received from that peer
- `endpoint` (`string`) contains the connected IPv4/IPv6 address and port of the peering
- `port` (`uint8`) contains the local switch port number for that peer
- `uptime` (`uint32`) contains the number of seconds since the peer connection was established
- `uptime` (`float64`) contains the number of seconds since the peer connection was established
#### `addPeer`