Documentation
¶
Index ¶
- Constants
- func AddProcessor(processor *Processor)
- func DecodeNexthop(in []byte, family Family) (out string, code int)
- func DecodePrefixes(in []byte, family Family, multipath bool) (out []string, code int)
- func Enable(enabled bool)
- func EncodeNexthop(in string, family Family) (out []byte)
- func EncodePrefix(in string, family Family, multipath bool) (out []byte)
- func RemoveProcessor(processor *Processor)
- func Update(update map[string]any)
- type Capability
- type Family
- type Group
- type Peer
- func (p *Peer) AddProcessor(processor *Processor)
- func (p *Peer) Cease(subcode int, message string)
- func (p *Peer) Duration() (duration time.Duration)
- func (p *Peer) EOR(list ...[]Family)
- func (p *Peer) Enable(enabled bool)
- func (p *Peer) Group() *Group
- func (p *Peer) LocalASN() (asn int)
- func (p *Peer) LocalAddr() (address string)
- func (p *Peer) LocalCapabilities() (list []Capability)
- func (p *Peer) LocalCapability(in string) (capability Capability, exists bool)
- func (p *Peer) LocalFamilies() (list []Family)
- func (p *Peer) LocalFamily(family Family) (exists bool)
- func (p *Peer) LocalMultipath(family Family, direction int) (ok bool)
- func (p *Peer) Name() string
- func (p *Peer) PeerASN() (asn int)
- func (p *Peer) PeerCapabilities() (list []Capability)
- func (p *Peer) PeerCapability(in string) (capability Capability, exists bool)
- func (p *Peer) PeerFamilies() (list []Family)
- func (p *Peer) PeerFamily(family Family) (exists bool)
- func (p *Peer) PeerMultipath(family Family, direction int) (ok bool)
- func (p *Peer) Refresh(family Family, enhanced ...int)
- func (p *Peer) RemoteAddr() (address string)
- func (p *Peer) Remove()
- func (p *Peer) RemoveProcessor(processor *Processor)
- func (p *Peer) Speaker() *Speaker
- func (p *Peer) State() (state string)
- func (p *Peer) Template() *Template
- func (p *Peer) Update(update map[string]any)
- type Processor
- type Speaker
- func (s *Speaker) AddPeer(remote, localASN, peerASN string, options ...map[string]any) (peer *Peer, err error)
- func (s *Speaker) AddTemplate(remotes []string, localASN, peerASN string, options ...map[string]any) (template *Template, err error)
- func (s *Speaker) Close()
- func (s *Speaker) Name() string
- func (s *Speaker) Peers() (peers []*Peer)
- func (s *Speaker) Templates() (templates []*Template)
- type Template
Constants ¶
View Source
const ( Receive = 1 Send = 1 )
Variables ¶
This section is empty.
Functions ¶
func AddProcessor ¶
func AddProcessor(processor *Processor)
func DecodePrefixes ¶
func EncodeNexthop ¶
func RemoveProcessor ¶
func RemoveProcessor(processor *Processor)
Types ¶
type Capability ¶
func NewCapability ¶
func NewCapability(in string) (capability Capability)
func (Capability) String ¶
func (c Capability) String() (out string)
func (Capability) Valid ¶
func (c Capability) Valid() bool
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
func (*Group) AddProcessor ¶
func (*Group) RemoveProcessor ¶
type Peer ¶
type Peer struct {
// contains filtered or unexported fields
}
func (*Peer) AddProcessor ¶
func (*Peer) LocalCapabilities ¶
func (p *Peer) LocalCapabilities() (list []Capability)
func (*Peer) LocalCapability ¶
func (p *Peer) LocalCapability(in string) (capability Capability, exists bool)
func (*Peer) LocalFamilies ¶
func (*Peer) LocalFamily ¶
func (*Peer) PeerCapabilities ¶
func (p *Peer) PeerCapabilities() (list []Capability)
func (*Peer) PeerCapability ¶
func (p *Peer) PeerCapability(in string) (capability Capability, exists bool)
func (*Peer) PeerFamilies ¶
func (*Peer) PeerFamily ¶
func (*Peer) RemoteAddr ¶
func (*Peer) RemoveProcessor ¶
type Processor ¶
type Processor struct { OnPeer func(group *Group, speaker *Speaker, peer *Peer, reason map[string]any) OnState func(group *Group, speaker *Speaker, peer *Peer, from, to string, reason map[string]any) OnUp func(group *Group, speaker *Speaker, peer *Peer) OnDown func(group *Group, speaker *Speaker, peer *Peer, reason map[string]any) OnMessage func(group *Group, speaker *Speaker, peer *Peer, direction, message string, payload []byte) OnUpdate func(group *Group, speaker *Speaker, peer *Peer, update map[string]any) OnRefresh func(group *Group, speaker *Speaker, peer *Peer, family Family, enhanced int) }
type Speaker ¶
type Speaker struct {
// contains filtered or unexported fields
}
func NewSpeaker ¶
func (*Speaker) AddTemplate ¶
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
func (*Template) RemovePrefix ¶
Click to show internal directories.
Click to hide internal directories.