reflector

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultReconnectInterval = time.Second * 15
	DefaultHoldTime          = time.Second * 90
	DefaultKeepAlive         = time.Second * 30
)

Defaults for BGP timers

Variables

This section is empty.

Functions

This section is empty.

Types

type BGPConfig

type BGPConfig struct {
	RouterID string `yaml:"router_id"`
	LocalAS  uint32 `yaml:"local_as"`

	LocalAddress string `yaml:"local_address"`

	IPv4MultiProtocol bool `yaml:"ipv4_multi_protocol"`

	StaticPeers []BGPPeer `yaml:"static_peers"`
	// contains filtered or unexported fields
}

func (*BGPConfig) Peers

func (c *BGPConfig) Peers() ([]bgp.PeerConfig, error)

type BGPPeer

type BGPPeer struct {
	RouterID                string `yaml:"router_id"`
	Address                 string `yaml:"peer_address"`
	AS                      uint32 `yaml:"peer_as"`
	AuthKey                 string `yaml:"auth_key"`
	Passive                 bool   `yaml:"passive"`
	RouteReflectorClient    bool   `yaml:"route_reflector_client"`
	RouteReflectorClusterID uint32 `yaml:"route_reflector_cluster_id"`
}

type Server

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

func NewServer

func NewServer(log logrus.FieldLogger, bgp bio.BGPServer, bgpConf BGPConfig) *Server

func (*Server) EnsurePeer

func (s *Server) EnsurePeer(ip *bnet.IP, name string) error

func (*Server) RemovePeer

func (s *Server) RemovePeer(ip *bnet.IP) error

func (*Server) Start

func (s *Server) Start(log logrus.FieldLogger) error

Jump to

Keyboard shortcuts

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