Documentation ¶
Overview ¶
Package etcd provides objects for creating an embedded etcd server process.
Index ¶
- func EtcdClient(etcdClientInfo configapi.EtcdConnectionInfo) (*etcdclient.Client, error)
- func GetAndTestEtcdClient(etcdClientInfo configapi.EtcdConnectionInfo) (*etcdclient.Client, error)
- func MakeNewEtcdClient(etcdClientInfo configapi.EtcdConnectionInfo) (newetcdclient.Client, error)
- func NeverRetryOnFailure(cluster *etcdclient.Cluster, numReqs int, lastResp http.Response, err error) error
- func TestEtcdClient(etcdClient *etcdclient.Client) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EtcdClient ¶ added in v1.0.5
func EtcdClient(etcdClientInfo configapi.EtcdConnectionInfo) (*etcdclient.Client, error)
EtcdClient creates an etcd client based on the provided config.
func GetAndTestEtcdClient ¶ added in v0.4.2
func GetAndTestEtcdClient(etcdClientInfo configapi.EtcdConnectionInfo) (*etcdclient.Client, error)
GetAndTestEtcdClient creates an etcd client based on the provided config. It will attempt to connect to the etcd server and block until the server responds at least once, or return an error if the server never responded. TODO: switch this function to use EtcdHelper.
func MakeNewEtcdClient ¶ added in v1.1.3
func MakeNewEtcdClient(etcdClientInfo configapi.EtcdConnectionInfo) (newetcdclient.Client, error)
MakeNewEtcdClient creates an etcd client based on the provided config.
func NeverRetryOnFailure ¶ added in v1.1.2
func NeverRetryOnFailure(cluster *etcdclient.Cluster, numReqs int, lastResp http.Response, err error) error
NeverRetryOnFailure is a retry function for the etcdClient. If there's only one machine, master election doesn't make much sense, so we don't bother to retry, we simply dump the failure and return the error directly.
func TestEtcdClient ¶ added in v1.0.5
func TestEtcdClient(etcdClient *etcdclient.Client) error
TestEtcdClient verifies a client is functional. It will attempt to connect to the etcd server and block until the server responds at least once, or return an error if the server never responded.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
This is a somewhat faithful reproduction of etcdmain/etcd.go
|
This is a somewhat faithful reproduction of etcdmain/etcd.go |