config

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: 10 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 struct {
	RouterID     string   `json:"router_id"`
	LocalAddress string   `json:"local_address"`
	LocalASN     uint32   `json:"local_asn"`
	Routes       []string `json:"routes"`
	Peers        []Peer   `json:"peers"`
}

func (Announcer) Validate

func (a Announcer) Validate() error

type Check

type Check struct {
	Kind string          `json:"kind"`
	Spec json.RawMessage `json:"spec"`
}

func (Check) Validate

func (c Check) Validate() error

type Config

type Config struct {
	Announcer Announcer `json:"announcer"`
	Services  []Service `json:"services"`
	Metrics   Metrics   `json:"metrics"`
}

func NewFromFile

func NewFromFile(filename string) (*Config, error)

func (*Config) Validate

func (c *Config) Validate() error

type Metrics

type Metrics struct {
	Enabled bool   `json:"enabled"`
	Address string `json:"address"`
}

func (Metrics) Validate

func (m Metrics) Validate() error

type Peer

type Peer struct {
	Name          string `json:"name"`
	RemoteAddress string `json:"remote_address"`
	RemoteASN     uint32 `json:"remote_asn"`
}

func (Peer) Validate

func (p Peer) Validate() error

type Service

type Service struct {
	Name          string      `json:"name"`
	CheckInterval th.Duration `json:"check_interval"`
	Checks        []Check     `json:"checks"`
}

func (Service) Validate

func (s Service) Validate() error

Jump to

Keyboard shortcuts

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