Documentation
¶
Index ¶
- Constants
- func EdgeID(a, b string) (id, source, target string)
- type AcceptedTraffic
- type EdgeHistory
- type EdgeState
- type HistoryEdgePage
- type HistoryEdgeQuery
- type HistoryEdgeSummary
- type HistoryMetadata
- type HistoryNodeReference
- type HistoryNodes
- type HistoryWindow
- type NodeIdentity
- type ObservationProvenance
- type ObserverReport
- type ObserverState
- type PathEvent
- type PathKind
- type PathObservation
- type PathTransition
- type PeerObservation
- type RelaySessionObservation
- type ReportEnvelope
- type ReportKind
- type ReportReceipt
- type Topology
- type TopologyEdge
- type TopologyNode
- type TrafficBucket
Constants ¶
View Source
const ProtocolVersion = 1
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AcceptedTraffic ¶
type EdgeHistory ¶
type EdgeHistory struct {
EdgeID string `json:"edgeId"`
Source HistoryNodeReference `json:"source"`
Target HistoryNodeReference `json:"target"`
From time.Time `json:"from"`
To time.Time `json:"to"`
BucketDurationMS int64 `json:"bucketDurationMs"`
Traffic []TrafficBucket `json:"traffic"`
PathAnchor *PathEvent `json:"pathAnchor,omitempty"`
PathEvents []PathEvent `json:"pathEvents"`
TrafficTruncated bool `json:"trafficTruncated"`
PathEventsTruncated bool `json:"pathEventsTruncated"`
}
type HistoryEdgePage ¶
type HistoryEdgePage struct {
Edges []HistoryEdgeSummary `json:"edges"`
NextCursor string `json:"nextCursor,omitempty"`
}
type HistoryEdgeQuery ¶
type HistoryEdgeQuery struct {
Window HistoryWindow
NodeID string
Path PathKind
Cursor string
Limit int
}
type HistoryEdgeSummary ¶
type HistoryEdgeSummary struct {
EdgeID string `json:"edgeId"`
Source HistoryNodeReference `json:"source"`
Target HistoryNodeReference `json:"target"`
LastTrafficAt time.Time `json:"lastTrafficAt"`
AToBBytes int64 `json:"aToBBytes"`
BToABytes int64 `json:"bToABytes"`
Paths []PathKind `json:"paths"`
}
type HistoryMetadata ¶
type HistoryMetadata struct {
Nodes []TopologyNode
Redirects map[string]string
}
type HistoryNodeReference ¶
type HistoryNodes ¶
type HistoryNodes struct {
Nodes []HistoryNodeReference `json:"nodes"`
}
type HistoryWindow ¶
type HistoryWindow string
const ( History15Minutes HistoryWindow = "15m" History1Hour HistoryWindow = "1h" History6Hours HistoryWindow = "6h" History24Hours HistoryWindow = "24h" History7Days HistoryWindow = "7d" )
func (HistoryWindow) Duration ¶
func (window HistoryWindow) Duration() time.Duration
func (HistoryWindow) Resolution ¶
func (window HistoryWindow) Resolution() time.Duration
func (HistoryWindow) Valid ¶
func (window HistoryWindow) Valid() bool
type NodeIdentity ¶
type NodeIdentity struct {
StableNodeID string `json:"stableNodeId"`
NodeID string `json:"nodeId,omitempty"`
NodeKey string `json:"nodeKey,omitempty"`
DiscoKey string `json:"discoKey,omitempty"`
Hostname string `json:"hostname"`
DNSName string `json:"dnsName,omitempty"`
OS string `json:"os,omitempty"`
TailscaleIPs []string `json:"tailscaleIps,omitempty"`
}
func (NodeIdentity) CanonicalID ¶
func (n NodeIdentity) CanonicalID() string
func (NodeIdentity) DisplayName ¶
func (n NodeIdentity) DisplayName() string
func (NodeIdentity) HasIdentity ¶
func (n NodeIdentity) HasIdentity() bool
func (NodeIdentity) IdentityKey ¶
func (n NodeIdentity) IdentityKey() string
type ObservationProvenance ¶
type ObserverReport ¶
type ObserverReport struct {
Observer NodeIdentity `json:"observer"`
InventoryGeneration string `json:"inventoryGeneration"`
Peers []PeerObservation `json:"peers,omitempty"`
}
type ObserverState ¶
type PathEvent ¶
type PathEvent struct {
ObservedAt time.Time `json:"observedAt"`
Path PathObservation `json:"path"`
Observations []ObservationProvenance `json:"observations"`
}
type PathObservation ¶
type PathObservation struct {
Kind PathKind `json:"kind"`
DirectEndpoint string `json:"directEndpoint,omitempty"`
DERPRegion string `json:"derpRegion,omitempty"`
PeerRelayStableNodeID string `json:"peerRelayStableNodeId,omitempty"`
}
func (PathObservation) Equal ¶
func (p PathObservation) Equal(other PathObservation) bool
type PathTransition ¶
type PathTransition struct {
EdgeID string
ObservedAt time.Time
Path PathObservation
Observations []ObservationProvenance
}
type PeerObservation ¶
type PeerObservation struct {
Peer NodeIdentity `json:"peer"`
RxBytes int64 `json:"rxBytes"`
TxBytes int64 `json:"txBytes"`
RxDelta int64 `json:"rxDelta"`
TxDelta int64 `json:"txDelta"`
SampleDurationMS int64 `json:"sampleDurationMs"`
Path PathObservation `json:"path"`
LastActive time.Time `json:"lastActive"`
}
type RelaySessionObservation ¶
type RelaySessionObservation struct {
Relay NodeIdentity `json:"relay"`
Source NodeIdentity `json:"source"`
Target NodeIdentity `json:"target"`
SessionID string `json:"sessionId"`
VNI int64 `json:"vni"`
SourceEndpoint string `json:"sourceEndpoint,omitempty"`
TargetEndpoint string `json:"targetEndpoint,omitempty"`
SourceToTargetBytes int64 `json:"sourceToTargetBytes"`
TargetToSourceBytes int64 `json:"targetToSourceBytes"`
SourceToTargetDelta int64 `json:"sourceToTargetDelta"`
TargetToSourceDelta int64 `json:"targetToSourceDelta"`
SampleDurationMS int64 `json:"sampleDurationMs"`
LastActive time.Time `json:"lastActive"`
}
func (RelaySessionObservation) Validate ¶
func (s RelaySessionObservation) Validate() error
type ReportEnvelope ¶
type ReportEnvelope struct {
Version int `json:"version"`
ReportID string `json:"reportId"`
ReporterInstanceID string `json:"reporterInstanceId"`
Sequence int64 `json:"sequence"`
CollectedAt time.Time `json:"collectedAt"`
Kind ReportKind `json:"kind"`
Observers []ObserverReport `json:"observers,omitempty"`
RelaySessions []RelaySessionObservation `json:"relaySessions,omitempty"`
}
func (ReportEnvelope) Validate ¶
func (r ReportEnvelope) Validate() error
type ReportKind ¶
type ReportKind string
const ( ReportObserverHello ReportKind = "observer_hello" ReportInventoryUpdate ReportKind = "inventory_update" ReportTrafficSample ReportKind = "traffic_sample" ReportObserverHeartbeat ReportKind = "observer_heartbeat" ReportRelaySessionUpdate ReportKind = "relay_session_update" )
type ReportReceipt ¶
type Topology ¶
type Topology struct {
GeneratedAt time.Time `json:"generatedAt"`
NextChangeAt *time.Time `json:"nextChangeAt,omitempty"`
Nodes []TopologyNode `json:"nodes"`
Edges []TopologyEdge `json:"edges"`
Observers []ObserverState `json:"observers"`
}
type TopologyEdge ¶
type TopologyEdge struct {
ID string `json:"id"`
Source string `json:"source"`
Target string `json:"target"`
Path PathObservation `json:"path"`
State EdgeState `json:"state"`
AToBBytesPerSecond float64 `json:"aToBBytesPerSecond"`
BToABytesPerSecond float64 `json:"bToABytesPerSecond"`
LastActive time.Time `json:"lastActive"`
Observations []ObservationProvenance `json:"observations"`
Conflicts []PathObservation `json:"conflicts,omitempty"`
}
type TopologyNode ¶
Click to show internal directories.
Click to hide internal directories.