peer.go 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c)2013-2020 ZeroTier, Inc.
  3. *
  4. * Use of this software is governed by the Business Source License included
  5. * in the LICENSE.TXT file in the project's root directory.
  6. *
  7. * Change Date: 2024-01-01
  8. *
  9. * On the date above, in accordance with the Business Source License, use
  10. * of this software will be governed by version 2.0 of the Apache License.
  11. */
  12. /****/
  13. package zerotier
  14. // Peer is another ZeroTier node
  15. type Peer struct {
  16. Address Address `json:"address"`
  17. Identity *Identity `json:"identity"`
  18. Fingerprint []byte `json:"fingerprint"`
  19. Version [3]int `json:"version"`
  20. Latency int `json:"latency"`
  21. Root bool `json:"root"`
  22. Bootstrap *InetAddress `json:"bootstrap,omitempty"`
  23. Paths []Path `json:"paths,omitempty"`
  24. }
  25. // PeerMutableFields contains only the mutable fields of Peer as nullable pointers.
  26. type PeerMutableFields struct {
  27. Identity *Identity `json:"identity"`
  28. Root *bool `json:"root"`
  29. Bootstrap *InetAddress `json:"bootstrap,omitempty"`
  30. }