Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
Host string `mapstructure:"host"`
Port uint64 `mapstructure:"port,omitempty"`
}
Connection is a configuration of an etcd host and port
func (*Connection) Verify ¶
func (c *Connection) Verify() error
type EtcdConfig ¶
type EtcdConfig struct {
Connections []Connection `mapstructure:"connections"`
Protocol EtcdProtocol `mapstructure:"protocol,omitempty"`
User string `mapstructure:"user,omitempty"`
Password string `mapstructure:"password,omitempty"`
RequestTimeoutSeconds uint64 `mapstructure:"request_timeout"`
}
EtcdConfig defines the way to configure the connection to the etcd database
func (*EtcdConfig) BuildEndpoints ¶
func (c *EtcdConfig) BuildEndpoints() []string
BuildEndpoints returns a slice of URLs that can be used in the method clientv3.New
func (*EtcdConfig) Verify ¶
func (c *EtcdConfig) Verify() error
type EtcdProtocol ¶
type EtcdProtocol string
const ( EtcdAsHTTPProtocol EtcdProtocol = "http" EtcdAsHTTPSProtocol EtcdProtocol = "https" )
func (*EtcdProtocol) Verify ¶
func (c *EtcdProtocol) Verify() error
Click to show internal directories.
Click to hide internal directories.