Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DaemonStatus ¶
type DaemonStatus struct {
RouterID string `json:"router_id"`
ASN uint32 `json:"asn"`
Version string `json:"version"`
Commit string `json:"commit"`
StartTime time.Time `json:"start_time"`
Peers []PeerStatus `json:"peers"`
VIPs []VIPStatus `json:"vips"`
}
DaemonStatus is the full daemon state returned on the diagnostic endpoint.
type HealthStatus ¶
type HealthStatus int
HealthStatus tracks whether a VIP's service is considered healthy.
const ( HealthUnknown HealthStatus = 0 HealthHealthy HealthStatus = 1 HealthUnhealthy HealthStatus = 2 )
func (HealthStatus) String ¶
func (h HealthStatus) String() string
type PeerStatus ¶
type PeerStatus struct {
Name string `json:"name"`
Address string `json:"address"`
PeerASN uint32 `json:"peer_asn"`
SessionState string `json:"session_state"`
Required bool `json:"required"`
Uptime string `json:"uptime,omitempty"`
}
PeerStatus is the observable state for one BGP neighbor.
type RouteAttrs ¶ added in v0.11.0
type RouteAttrs struct {
// ASPathPrepend is the number of additional local-ASN hops added to the
// AS_PATH (on top of the single hop GoBGP adds on eBGP export).
ASPathPrepend int `json:"as_path_prepend"`
// Communities are standard BGP communities in "ASN:value" form.
Communities []string `json:"communities,omitempty"`
}
RouteAttrs are the BGP path attributes pathosd controls on an originated VIP route. The zero value means a plain announcement: no extra AS_PATH prepends and no communities.
type VIPStatus ¶
type VIPStatus struct {
Name string `json:"name"`
Prefix string `json:"prefix"`
State VIPState `json:"state"`
StateName string `json:"state_name"`
Health HealthStatus `json:"health"`
HealthName string `json:"health_name"`
ConsecutiveOK int `json:"consecutive_ok"`
ConsecutiveFail int `json:"consecutive_fail"`
LastCheckSuccess bool `json:"last_check_success"`
LastCheckDetail string `json:"last_check_detail"`
LastCheckTime time.Time `json:"last_check_time"`
LastTransitionTime time.Time `json:"last_transition_time"`
LastTransitionReason string `json:"last_transition_reason"`
CheckType string `json:"check_type"`
BGPPending bool `json:"bgp_pending"`
// ASPathPrependBase is policy.announce.as_path_prepend: the prepend this
// node applies to every announcement of the VIP (its standby rank).
ASPathPrependBase int `json:"as_path_prepend_base"`
// ASPathPrepend is the prepend currently applied: the base while
// announced (or withdrawn), base + lower_priority while pessimized.
ASPathPrepend int `json:"as_path_prepend"`
// Communities currently attached to the route (announce block, merged
// with lower_priority while pessimized).
Communities []string `json:"communities,omitempty"`
}
VIPStatus is the full observable state for one VIP.
Click to show internal directories.
Click to hide internal directories.