config

package
v0.0.0-...-12af3c0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultResponseTimeout specifies the default time limit to wait for response
	// header in a single request made by an etcd client
	DefaultResponseTimeout = 1 * time.Second
	// DefaultDialTimeout is default TCP connect timeout
	DefaultDialTimeout = 30 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Endpoints lists etcd server endpoints (http://host:port)
	Endpoints []string
	// CAFile defines the SSL Certificate Authority file to used
	// to secure etcd communication
	CAFile string
	// CertFile defines the SSL certificate file to use to secure
	// etcd communication
	CertFile string
	// KeyFile defines the SSL key file to use to secure etcd communication
	KeyFile string
	// HeaderTimeoutPerRequest specifies the time limit to wait for response
	// header in a single request made by a client
	HeaderTimeoutPerRequest time.Duration
	// DialTimeout is dial timeout
	DialTimeout time.Duration
}

Config defines the configuration to access etcd

func (*Config) CheckAndSetDefaults

func (r *Config) CheckAndSetDefaults() error

func (*Config) NewClient

func (r *Config) NewClient() (etcd.Client, error)

NewClient creates a new instance of an etcd client

func (*Config) NewClientV3

func (r *Config) NewClientV3() (*etcdv3.Client, error)

NewClientV3 creates a new instance of an etcdv3 client

Jump to

Keyboard shortcuts

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