Documentation ¶
Overview ¶
Package horizon provides the implementation for Penne Horizons
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeHorizons ¶
func MakeHorizons(conf []Config, _ map[string]resolver.Exchanger) ([]string, map[string]*Horizon, error)
MakeHorizons builds Horizons from a Config slice
func NewContextKey ¶
func NewContextKey(name string) *core.ContextKey[horizon.Match]
NewContextKey returns a core.ContextKey to be used to store the horizon.Match in horizon.Horizons
Types ¶
type Config ¶
type Config struct { Name string `yaml:"name"` Next string `yaml:"next,omitempty" toml:",omitempty" json:",omitempty"` AllowForwarding bool `yaml:"allow_forwarding,omitempty" toml:",omitempty" json:",omitempty"` Networks []netip.Prefix `yaml:"networks,omitempty" toml:",omitempty" json:",omitempty"` Resolver string `yaml:"resolver,omitempty" toml:",omitempty" json:",omitempty"` }
Config describes a Horizon
type Horizon ¶
A Horizon is a resolver.Exchanger for a particular set of networks
Click to show internal directories.
Click to hide internal directories.