announcer

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Announcer

type Announcer interface {
	Announce(ctx context.Context) error
	Denounce(ctx context.Context) error
}

func New

func New(cfg Config) Announcer

type Config

type Config struct {
	GoBGP    GoBGPServer
	Prefixes []string
	NextHop  string
	LocalASN uint32
}

type GoBGPServer

type GoBGPServer interface {
	AddPath(ctx context.Context, r *api.AddPathRequest) (*api.AddPathResponse, error)
	DeletePath(ctx context.Context, r *api.DeletePathRequest) error
}

type Logger

type Logger struct {
	Logger *log.Logger
}

func (*Logger) Debug

func (l *Logger) Debug(msg string, fields gobgpLog.Fields)

func (*Logger) Error

func (l *Logger) Error(msg string, fields gobgpLog.Fields)

func (*Logger) Fatal

func (l *Logger) Fatal(msg string, fields gobgpLog.Fields)

func (*Logger) GetLevel

func (l *Logger) GetLevel() gobgpLog.LogLevel

func (*Logger) Info

func (l *Logger) Info(msg string, fields gobgpLog.Fields)

func (*Logger) Panic

func (l *Logger) Panic(msg string, fields gobgpLog.Fields)

func (*Logger) SetLevel

func (l *Logger) SetLevel(level gobgpLog.LogLevel)

func (*Logger) Warn

func (l *Logger) Warn(msg string, fields gobgpLog.Fields)

type Metrics

type Metrics interface {
	Run(ctx context.Context) error
	Register() error
}

func NewMetricsRepository

func NewMetricsRepository(bgpSrv *server.BgpServer, routerID string, asn uint32) Metrics

type Mock

type Mock struct {
	mock.Mock
}

func NewMock

func NewMock() *Mock

func (*Mock) Announce

func (m *Mock) Announce(ctx context.Context) error

func (*Mock) Denounce

func (m *Mock) Denounce(ctx context.Context) error

Jump to

Keyboard shortcuts

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