Documentation ¶
Index ¶
- func UpdateConf(source string, cfile string) error
- type Config
- func (c *Config) FromEtcd(cfile string) *Config
- func (c *Config) FromFile(cfile string) *Config
- func (c *Config) GetIRB() map[string][]string
- func (c Config) GetNodesPrivateSubnets() []string
- func (c *Config) Load() error
- func (c Config) UpdateEtcd(cfile string) error
- func (c *Config) Watcher(ctx context.Context, extNotify chan struct{})
- func (c Config) Whoami() (Node, error)
- type Node
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UpdateConf ¶
UpdateConf updates etcd from file and reverse
Types ¶
type Config ¶
type Config struct { Server struct { Name string `yaml:"name"` Address string `yaml:"address"` MaxWorkers int `yaml:"maxworkers"` Keepalive int `yaml:"keepalive"` Insecure bool `yaml:"insecure"` Mtu int `yaml:"mtu"` } `yaml:"server"` Crypto struct { Type string `yaml:"type"` Key string `yaml:"key"` } `yaml:"crypto"` Nodes []struct { Node `yaml:"node"` } `yaml:"nodes"` Etcd struct { Endpoints []string `yaml:endpoints` Timeout int `yaml:timeout` } `yaml:"etcd"` Revision int `yaml:"revision"` // contains filtered or unexported fields }
Config represents configuration
func (Config) GetNodesPrivateSubnets ¶
GetNodesPrivateSubnets returns all nodes private subnets
func (Config) UpdateEtcd ¶
UpdateEtcd updates etcd from file
type Node ¶
type Node struct { Name string `yaml:"name"` Address string `yaml:"address"` PrivateAddresses []string `yaml:"privateAddresses"` PrivateSubnets []string `yaml:"privateSubnets"` }
Node represents node / host IP configuration
func (Node) GetPrivateAddresses ¶
GetPrivateAddresses gets the node's private addresses
func (Node) GetPrivateSubnets ¶
GetPrivateSubnets gets the node's private subnets
Click to show internal directories.
Click to hide internal directories.