Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsulConfig ¶
type ConsulConfig struct { // Nodes is a list of backend nodes. // A connection will only be established to the first server in the list. Nodes []string // The backend URI scheme (http or https). Scheme string // A DNS server record to discover the consul nodes. SRVRecord SRVRecord `toml:"srv_record"` // The client cert file. ClientCert string `toml:"client_cert"` // The client key file. ClientKey string `toml:"client_key"` //The client CA key file. ClientCaKeys string `toml:"client_ca_keys"` template.Backend }
ConsulConfig represents the config for the consul backend.
func (*ConsulConfig) Connect ¶
func (c *ConsulConfig) Connect() (template.Backend, error)
Connect creates a new consulClient and fills the underlying template.Backend with the consul-Backend specific data.
func (*ConsulConfig) GetBackend ¶ added in v0.12.2
func (c *ConsulConfig) GetBackend() *template.Backend
return Backend config to allow modification before connect() for onetime param or similar
type EnvConfig ¶
EnvConfig represents the config for the env backend
func (*EnvConfig) Connect ¶
Connect creates a new envClient and fills the underlying template.Backend with the file-Backend specific data.
func (*EnvConfig) GetBackend ¶ added in v0.12.2
return Backend config to allow modification before connect() for onetime param or similar
type EtcdConfig ¶
type EtcdConfig struct { // Nodes is list of backend nodes. Nodes []string // The backend URI scheme (http or https). // This is only used when the nodes are discovered via DNS srv records and the api level is 2. // // The default is http. Scheme string // The client cert file. ClientCert string `toml:"client_cert"` // The client key file. ClientKey string `toml:"client_key"` // The client CA key file. ClientCaKeys string `toml:"client_ca_keys"` // A DNS server record to discover the etcd nodes. SRVRecord SRVRecord `toml:"srv_record"` // The username for the basic_auth authentication. Username string // The password for the basic_auth authentication. Password string // The etcd api-level to use (2 or 3). // // The default is 2. Version int template.Backend }
EtcdConfig represents the config for the etcd backend.
func (*EtcdConfig) Connect ¶
func (c *EtcdConfig) Connect() (template.Backend, error)
Connect creates a new etcd{2,3}Client and fills the underlying template.Backend with the etcd-Backend specific data.
func (*EtcdConfig) GetBackend ¶ added in v0.12.2
func (c *EtcdConfig) GetBackend() *template.Backend
return Backend config to allow modification before connect() for onetime param or similar
type FileConfig ¶
type FileConfig struct { // The filepath to a yaml or json file containing the key-value pairs. // This can be a local file or a remote http/https location. Filepath string // Optional HTTP headers to append to the request if the file path is a remote http/https location. HTTPHeaders map[string]string template.Backend }
FileConfig represents the config for the file backend.
func (*FileConfig) Connect ¶
func (c *FileConfig) Connect() (template.Backend, error)
Connect creates a new fileClient and fills the underlying template.Backend with the file-Backend specific data.
func (*FileConfig) GetBackend ¶ added in v0.12.2
func (c *FileConfig) GetBackend() *template.Backend
return Backend config to allow modification before connect() for onetime param or similar
type MockConfig ¶
MockConfig represents the config for the consul backend.
func (*MockConfig) Connect ¶
func (c *MockConfig) Connect() (template.Backend, error)
Connect creates a new mockClient
func (*MockConfig) GetBackend ¶ added in v0.12.2
func (c *MockConfig) GetBackend() *template.Backend
return Backend config to allow modification before connect() for onetime param or similar
type NatsConfig ¶ added in v0.12.3
type NatsConfig struct { // Nodes is list of backend nodes. Nodes []string // The Nats kv bucket Bucket string // The username for the basic_auth authentication. Username string // The password for the basic_auth authentication. Password string // The token for the token auth method Token string // The path to an NATS 2.0 and NATS NGS compatible user credentials file Creds string template.Backend }
NatsConfig represents the config for the nats backend.
func (*NatsConfig) Connect ¶ added in v0.12.3
func (c *NatsConfig) Connect() (template.Backend, error)
Connect creates a new etcd{2,3}Client and fills the underlying template.Backend with the etcd-Backend specific data.
func (*NatsConfig) GetBackend ¶ added in v0.12.3
func (c *NatsConfig) GetBackend() *template.Backend
return Backend config to allow modification before connect() for onetime param or similar
type RedisConfig ¶
type RedisConfig struct { // A list of backend nodes. Nodes []string // A DNS server record to discover the redis nodes. SRVRecord SRVRecord `toml:"srv_record"` // The redis password. Password string // The redis database. Database int template.Backend }
RedisConfig represents the config for the redis backend.
func (*RedisConfig) Connect ¶
func (c *RedisConfig) Connect() (template.Backend, error)
Connect creates a new redisClient and fills the underlying template.Backend with the redis-Backend specific data.
func (*RedisConfig) GetBackend ¶ added in v0.12.2
func (c *RedisConfig) GetBackend() *template.Backend
return Backend config to allow modification before connect() for onetime param or similar
type SRVRecord ¶
type SRVRecord string
SRVRecord is a SRV-Record string for example _etcd-client._tcp.example.com.
type VaultConfig ¶
type VaultConfig struct { // The address of the vault server. Node string // The vault authentication type. // (token, approle, app-id, userpass, github, cert, kubernetes) AuthType string `toml:"auth_type"` // The vault app ID. // Only used with auth_type=app-id. AppID string `toml:"app_id"` // The vault user ID. // Only used with auth_type=app-id. UserID string `toml:"user_id"` // The vault RoleID. // Only used with auth_type=approle and kubernetes. RoleID string `toml:"role_id"` // The vault SecretID. // Only used with auth_type=approle. SecretID string `toml:"secret_id"` // The username for the userpass authentication. Username string // The password for the userpass authentication. Password string // The vault authentication token. Only used with auth_type=token and github. AuthToken string `toml:"auth_token"` ClientCert string `toml:"client_cert"` ClientKey string `toml:"client_key"` ClientCaKeys string `toml:"client_ca_keys"` template.Backend }
VaultConfig represents the config for the vault backend.
func (*VaultConfig) Connect ¶
func (c *VaultConfig) Connect() (template.Backend, error)
Connect creates a new vaultClient and fills the underlying template.Backend with the vault-Backend specific data.
func (*VaultConfig) GetBackend ¶ added in v0.12.2
func (c *VaultConfig) GetBackend() *template.Backend
return Backend config to allow modification before connect() for onetime param or similar
type ZookeeperConfig ¶
type ZookeeperConfig struct { // A list of zookeeper nodes. Nodes []string // A DNS server record to discover the zookeeper nodes. SRVRecord SRVRecord `toml:"srv_record"` template.Backend }
ZookeeperConfig represents the config for the consul backend.
func (*ZookeeperConfig) Connect ¶
func (c *ZookeeperConfig) Connect() (template.Backend, error)
Connect creates a new zookeeperClient and fills the underlying template.Backend with the zookeeper-Backend specific data.
func (*ZookeeperConfig) GetBackend ¶ added in v0.12.2
func (c *ZookeeperConfig) GetBackend() *template.Backend
return Backend config to allow modification before connect() for onetime param or similar