Help us shape the future of Go! Take the 2026 Go Developer Survey

bgp

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 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) SetLogLevel added in v0.14.0

func (m *Manager) SetLogLevel(level string)

SetLogLevel changes the level of the embedded GoBGP logger (config reload of logging.level).

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