etcd

package
v0.0.0-...-fa273ca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Endpoints     = "endpoints"
	CoreDNSPath   = "coredns_path"
	ClientCert    = "client_cert"
	ClientCertKey = "client_cert_key"

	EnvEtcdState         = "MINIO_ETCD_STATE"
	EnvEtcdEndpoints     = "MINIO_ETCD_ENDPOINTS"
	EnvEtcdCoreDNSPath   = "MINIO_ETCD_COREDNS_PATH"
	EnvEtcdClientCert    = "MINIO_ETCD_CLIENT_CERT"
	EnvEtcdClientCertKey = "MINIO_ETCD_CLIENT_CERT_KEY"
)

etcd environment values

Variables

View Source
var (
	DefaultKVS = config.KVS{
		config.State:   config.StateOff,
		config.Comment: "This is a default etcd configuration",
		Endpoints:      "",
		CoreDNSPath:    "/skydns",
		ClientCert:     "",
		ClientCertKey:  "",
	}
)

DefaultKVS - default KV settings for etcd.

View Source
var (
	Help = config.HelpKV{
		Endpoints:      `(required) Comma separated list of etcd endpoints eg: "http://localhost:2379"`,
		CoreDNSPath:    `(optional) CoreDNS etcd path location to populate DNS srv records eg: "/skydns"`,
		ClientCert:     `(optional) Etcd client cert for mTLS authentication`,
		ClientCertKey:  `(optional) Etcd client cert key for mTLS authentication`,
		config.State:   "Indicates if etcd config is on or off",
		config.Comment: "A comment to describe the etcd settings",
	}
)

etcd config documented in default config

Functions

func New

func New(cfg Config) (*clientv3.Client, error)

New - initialize new etcd client.

Types

type Config

type Config struct {
	Enabled     bool   `json:"enabled"`
	CoreDNSPath string `json:"coreDNSPath"`
	clientv3.Config
}

Config - server etcd config.

func LookupConfig

func LookupConfig(kvs config.KVS, rootCAs *x509.CertPool) (Config, error)

LookupConfig - Initialize new etcd config.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL