policy

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Evaluate

func Evaluate(healthy bool, lowerPriorityFilePresent bool, p *config.PolicyConfig) model.VIPState

Types

type BGPNotifier

type BGPNotifier interface {
	AnnounceVIP(ctx context.Context, prefix string) error
	WithdrawVIP(ctx context.Context, prefix string) error
	PessimizeVIP(ctx context.Context, prefix string, prepend int, communities []string) error
}

type Manager

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

func NewManager

func NewManager(vipConfigs []config.VIPConfig, m *metrics.Metrics, notifier BGPNotifier) *Manager

func (*Manager) GetVIPStatuses

func (m *Manager) GetVIPStatuses() []model.VIPStatus

func (*Manager) OnCheckResult

func (m *Manager) OnCheckResult(vipName string, result checks.Result)

func (*Manager) OnHealthTransition

func (m *Manager) OnHealthTransition(t checks.HealthTransition)

type StateChange

type StateChange struct {
	VIPName  string
	Prefix   string
	OldState model.VIPState
	NewState model.VIPState
	Reason   string
}

Jump to

Keyboard shortcuts

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