config

package
v0.0.0-...-69d5e98 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ServiceAPIServer        = ServiceID{Type: ServiceTypeAPIServer, Name: "APIServer"}
	ServiceInterfaceMonitor = ServiceID{Type: ServiceTypeInterfaceMonitor, Name: "InterfaceMonitor"}
	ServiceOSPF             = ServiceID{Type: ServiceTypeOSPF, Name: "OSPF"}
)

Functions

This section is empty.

Types

type Bootstrap

type Bootstrap struct {
	ID     ServiceID
	Config any
}

type Config

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

func (*Config) Bootstraps

func (c *Config) Bootstraps() []Bootstrap

func (*Config) Copy

func (c *Config) Copy() *Config

type ConfigManager

type ConfigManager struct {
	*sync.Notifier[*Config]
}

func NewConfigManager

func NewConfigManager(path string) (*ConfigManager, error)

func (*ConfigManager) Run

func (c *ConfigManager) Run(ctx context.Context) error

func (*ConfigManager) UpdateConfig

func (c *ConfigManager) UpdateConfig(conf *Config) error

type OSPFAreaConfig

type OSPFAreaConfig struct {
	Cost               uint16
	HelloInterval      uint16
	RouterDeadInterval uint32
	Interfaces         map[string]OSPFInterfaceConfig
}

type OSPFConfig

type OSPFConfig struct {
	RouterID           common.RouterID
	Cost               uint16
	HelloInterval      uint16
	RouterDeadInterval uint32
	Areas              map[common.AreaID]OSPFAreaConfig
}

func (*OSPFConfig) InterfaceConfigs

func (c *OSPFConfig) InterfaceConfigs() map[string]OSPFInterfaceConfig

type OSPFInterfaceConfig

type OSPFInterfaceConfig struct {
	AreaID             common.AreaID
	Cost               uint16
	HelloInterval      uint16
	RouterDeadInterval uint32
}

type ServiceID

type ServiceID struct {
	Type ServiceType
	Name string
}

type ServiceType

type ServiceType int
const (
	ServiceTypeAPIServer ServiceType = iota
	ServiceTypeInterfaceMonitor
	ServiceTypeOSPF
)

func (ServiceType) String

func (t ServiceType) String() string

Jump to

Keyboard shortcuts

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