Documentation
¶
Index ¶
- Constants
- func CheckCli(ctx context.Context, lp string) error
- func CliCmd(ctx context.Context, lp string, arg ...string) (string, error)
- func Configure(ctx context.Context, lp, configFile string) (string, error)
- func LookupCli() (string, error)
- func NewProtocolMap() protocolMap
- func ParseProtocols(input string, out *string, f func(name string, options ...Option))
- func ProtocolDown(p *Protocol) bool
- func Run(ctx context.Context, configFile string, monitorLogs bool) error
- func ShowBfdSessions(ctx context.Context, lp, name string) (string, error)
- func ShowProtocolSessions(ctx context.Context, lp, pattern string) (string, error)
- func Verify(ctx context.Context, lp, configFile string) (string, error)
- type Option
- func WithBfd(use bool) Option
- func WithBfdSessions(bfd string) Option
- func WithInfo(info string) Option
- func WithInterface(itf string) Option
- func WithName(name string) Option
- func WithNeighbor(ip string) Option
- func WithOutLog(log *string) Option
- func WithProto(proto string) Option
- func WithState(state string) Option
- type Protocol
- func (p *Protocol) Bfd() bool
- func (p *Protocol) BfdSessions() string
- func (p *Protocol) Info() string
- func (p *Protocol) Interface() string
- func (p *Protocol) Log(out string)
- func (p *Protocol) Name() string
- func (p *Protocol) Neighbor() string
- func (p *Protocol) Proto() string
- func (p *Protocol) State() string
Constants ¶
const ( NoProtocolsLog string = "No protocols match" ReconfigInProgress string = "Reconfiguration in progress" Reconfigured string = "Reconfigured" ConfigurationOk string = "Configuration OK" )
const ( BGP string = "BGP" STATIC string = "Static" )
Variables ¶
This section is empty.
Functions ¶
func NewProtocolMap ¶
func NewProtocolMap() protocolMap
func ParseProtocols ¶
ParseProtocols - Parses output of 'birdc show protocols all' to pass details of a protocol session to the provided func pointer (while also writing relevant information to out log string)
func ProtocolDown ¶
ProtocolDown - Determines if protocol is down
func Run ¶
Run - Starts BIRD process with the config file (blocks) Based on monitorLogs settings stderr of the started BIRD process can be monitored, so that important log snippets get appended to the container's log
func ShowBfdSessions ¶
ShowProtocolSessions - Retrieves information on the available BFD sessions (for the given BFD protocol name if any)
func ShowProtocolSessions ¶
ShowProtocolSessions - Retrieves detailed routing protocol information via birdc
Types ¶
type Option ¶
type Option func(o *protoOptions)
Option is an option pattern for NewProtocol
func WithBfdSessions ¶
WithBfdSessions sets known bfd sessions
func WithInterface ¶
WithInterface sets protocol interface (e.g. ext-vlan)
func WithNeighbor ¶
WithNeighbor sets protocol neighbor (e.g. 169.254.100.254)
type Protocol ¶
type Protocol struct {
// contains filtered or unexported fields
}