 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
- type DebugInfo
- type DebugInfoPeer
- type DebugInfoPrefix
- type DebugInfoServer
- type Server
- func (s *Server) AddPeer(address net.IP, asn uint32, password string, holdTime uint64) error
- func (s *Server) AddPrefix(subnet net.IPNet, nexthop net.IP, owner string) error
- func (s *Server) Configure(address string, asn uint32, routerID net.IP) error
- func (s *Server) Debug() DebugInfo
- func (s *Server) RemovePeer(address net.IP) error
- func (s *Server) RemovePrefix(subnet net.IPNet, nexthop net.IP) error
- func (s *Server) RemovePrefixByOwner(owner string) error
 
Constants ¶
This section is empty.
Variables ¶
var ErrBadRouterID = errors.New("Invalid router-id (must be IPv4 address")
    ErrBadRouterID is returned when an invalid router-id is provided.
var ErrPeerNotFound = errors.New("Peer not found")
    ErrPeerNotFound is returned when a user provided peer couldn't be found.
var ErrPrefixNotFound = errors.New("Prefix not found")
    ErrPrefixNotFound is returned when a user provided prefix couldn't be found.
Functions ¶
This section is empty.
Types ¶
type DebugInfo ¶
type DebugInfo struct {
	Server   DebugInfoServer   `json:"server" yaml:"server"`
	Prefixes []DebugInfoPrefix `json:"prefixes" yaml:"prefixes"`
	Peers    []DebugInfoPeer   `json:"peers" yaml:"peers"`
}
    DebugInfo represents the internal debug state of the BGP server.
type DebugInfoPeer ¶
type DebugInfoPeer struct {
	Address  string `json:"address" yaml:"address"`
	ASN      uint32 `json:"asn" yaml:"asn"`
	Password string `json:"password" yaml:"password"`
	Count    int    `json:"count" yaml:"count"`
	HoldTime uint64 `json:"holdtime" yaml:"holdtime"`
}
    DebugInfoPeer exposes details on a single BGP peer.
type DebugInfoPrefix ¶
type DebugInfoPrefix struct {
	Owner   string `json:"owner" yaml:"owner"`
	Prefix  string `json:"prefix" yaml:"prefix"`
	Nexthop string `json:"nexthop" yaml:"nexthop"`
}
    DebugInfoPrefix exposes details on a single BGP prefix.
type DebugInfoServer ¶
type DebugInfoServer struct {
	Address  string `json:"address" yaml:"address"`
	ASN      uint32 `json:"asn" yaml:"asn"`
	RouterID string `json:"router_id" yaml:"router_id"`
	Running  bool   `json:"running" yaml:"running"`
}
    DebugInfoServer exposes the shared listener configuration.
type Server ¶
type Server struct {
	// contains filtered or unexported fields
}
    Server represents a BGP server instance.
func (*Server) Configure ¶ added in v6.0.4
Configure updates the listener with a new configuration..
func (*Server) RemovePeer ¶
RemovePeer removes a prefix from the BGP server.
func (*Server) RemovePrefix ¶
RemovePrefix removes a prefix from the BGP server.
func (*Server) RemovePrefixByOwner ¶
RemovePrefixByOwner removes all prefixes for the provided owner.