package
Version:
v0.0.0-...-4c5efe1
Opens a new window with list of versions in this module.
Published: Dec 11, 2021
License: GPL-3.0
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
View Source
const (
RaftDir = "raft"
RaftListen = ":7001"
RaftLogLevel = "off"
EtcdLogLevel = "error"
EtcdPrefix = "/haproxy-lb"
HAProxyService = "haproxy"
HAProxyConfigFile = "/etc/haproxy/haproxy.cfg"
)
type APIServer struct {
Listen string `yaml:"listen"`
TLS *TLS `yaml:"tls"`
DisableAuth bool `yaml:"disableAuth"`
BasicAuth []BasicAuth `yaml:"basicAuth"`
}
type BasicAuth struct {
User string `yaml:"user"`
Hash string `yaml:"hash"`
Prefix string `yaml:"prefix"`
}
type Cluster struct {
Raft *Raft `yaml:"raft,omitempty"`
Etcd *Etcd `yaml:"etcd,omitempty"`
}
type Config struct {
LeaderHook string `yaml:"leaderHook,omitempty"`
FollowerHook string `yaml:"followerHook,omitempty"`
HAProxyConfig string `yaml:"haproxyConfig,omitempty"`
HAProxyService string `yaml:"haproxyService,omitempty"`
Failover *Failover `yaml:"failover"`
VIP VIP `yaml:"vip"`
Cluster Cluster `yaml:"cluster"`
APIServer APIServer `yaml:"apiServer"`
}
type Etcd struct {
Endpoints []string `yaml:"endpoints"`
ClusterName string `yaml:"clusterName"`
Prefix string `yaml:"prefix,omitempty"`
Username string `yaml:"username,omitempty"`
Password string `yaml:"password,omitempty"`
TLS *TLS `yaml:"tls,omitempty"`
LogLevel string `yaml:"logLevel,omitempty"`
}
type Failover struct {
IP string `yaml:"ip"`
Interface string `yaml:"interface"`
}
type Netbox struct {
Endpoint string `yaml:"endpoint"`
Token string `yaml:"token"`
Insecure bool `yaml:"insecure,omitempty"`
}
type Raft struct {
Dir string `yaml:"dir,omitempty"`
ID string `yaml:"id"`
Listen string `yaml:"listen"`
Peers []RaftPeer `yaml:"peers"`
TLS *TLS `yaml:"tls,omitempty"`
LogLevel string `yaml:"logLevel,omitempty"`
}
type RaftPeer struct {
ID string `yaml:"id"`
Address string `yaml:"address"`
}
RaftPeer details the configuration of all cluster peers
type Store struct {
Local *struct{} `yaml:"local"`
Netbox *Netbox `yaml:"netbox"`
}
type TLS struct {
Cert string `yaml:"cert,omitempty"`
Key string `yaml:"key,omitempty"`
CA string `yaml:"ca,omitempty"`
Insecure bool `yaml:"insecure,omitempty"`
}
type VIP struct {
Prefix string `yaml:"prefix"`
Store Store `yaml:"store"`
Interface string `yaml:"interface,omitempty"`
Label string `yaml:"label,omitempty"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.