bgp

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WatchPeerState

func WatchPeerState(ctx context.Context, s *server.BgpServer, m *metrics.Metrics, neighbors map[string]string, onChange func())

WatchPeerState logs peer session state changes until ctx is done. onChange, when non-nil, is called after each change.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(cfg *config.Config, metrics *pathosmetrics.Metrics) *Manager

func (*Manager) AddPeers

func (m *Manager) AddPeers(ctx context.Context) error

func (*Manager) AnnounceVIP

func (m *Manager) AnnounceVIP(ctx context.Context, prefix string, attrs model.RouteAttrs) error

AnnounceVIP installs (or replaces) the VIP route at full priority with the given attributes.

func (*Manager) GetPeerStates

func (m *Manager) GetPeerStates(ctx context.Context) []model.PeerStatus

func (*Manager) PessimizeVIP

func (m *Manager) PessimizeVIP(ctx context.Context, prefix string, attrs model.RouteAttrs) error

PessimizeVIP installs (or replaces) the VIP route with lowered priority attributes. It is the same operation as AnnounceVIP; the distinct name keeps traces and logs readable.

func (*Manager) RegisterMetrics

func (m *Manager) RegisterMetrics(reg prometheus.Registerer) error

func (*Manager) Server

func (m *Manager) Server() *server.BgpServer

func (*Manager) Start

func (m *Manager) Start(ctx context.Context) error

func (*Manager) Stop

func (m *Manager) Stop(ctx context.Context)

func (*Manager) WithdrawVIP

func (m *Manager) WithdrawVIP(ctx context.Context, prefix string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL