Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfigFile ¶
func LoadConfigFile(filename string) (map[string]PeerConfig, error)
LoadConfigFile reads and parses the JSON configuration file. It returns a map of IP address strings to PeerConfig for O(1) lookups.
Types ¶
type BenchStats ¶
type BenchStats struct {
Duration time.Duration
GCCycles uint32
TotalAlloc uint64
HeapObjs uint64
SteadyStateHeap uint64
}
IngestBenchmark runs a full-table ingestion benchmark. It returns stats about the run.
func RunIngestBenchmark ¶
func RunIngestBenchmark(prefixCount int, useAddPath bool) (BenchStats, error)
type ConfigFile ¶
type ConfigFile struct {
Peers []PeerConfig `json:"peers"`
}
ConfigFile represents the JSON configuration file
type GracefulRestartManager ¶
type GracefulRestartManager interface {
HandlePeerDown(ctx context.Context, peerIP string) error
ProcessCapExchange(ctx context.Context, peerIP string, params bgp.Parameters) error
ReceiveEoR(ctx context.Context, peerIP string, family Family) error
CompleteGracefulRestart(ctx context.Context, peerIP string) error
}
GracefulRestartManager defines the interface for managing BGP Graceful Restart state transitions for the receiving speaker (helper mode).
func NewGracefulRestartManager ¶
func NewGracefulRestartManager(s *Server) GracefulRestartManager
NewGracefulRestartManager creates a new instance of the default GR manager.
type PeerConfig ¶
type PeerConfig struct {
IP string `json:"ip"`
Name string `json:"name,omitempty"`
Password string `json:"password,omitempty"`
}
PeerConfig holds the configuration for a single peer
type PeerStatus ¶
type PeerStatus uint32
PeerStatus defines the atomic state values for the Graceful Restart state machine.
const ( StatusEstablished PeerStatus = iota StatusGRStale StatusWaitingForEOR StatusPurging StatusPurgingRemainingStale )
func (PeerStatus) String ¶
func (s PeerStatus) String() string
Click to show internal directories.
Click to hide internal directories.