Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PodManifestsHaveTLS ¶
PodManifestsHaveTLS reads the etcd staticpod manifest from disk and returns false if the TLS flags are missing from the command list. If all the flags are present it returns true.
Types ¶
type Client ¶
type Client interface { GetStatus() (*clientv3.StatusResponse, error) WaitForStatus(delay time.Duration, retries int, retryInterval time.Duration) (*clientv3.StatusResponse, error) HasTLS() bool }
Client is an interface to get etcd cluster related information
type GenericClient ¶
GenericClient is a common etcd client for supported etcd servers
func NewClient ¶
func NewClient(endpoints []string, caFile string, certFile string, keyFile string) (*GenericClient, error)
NewClient creates a new EtcdCluster client
func NewStaticPodClient ¶
func NewStaticPodClient(endpoints []string, manifestDir string, certificatesDir string) (*GenericClient, error)
NewStaticPodClient creates a GenericClient from the given endpoints, manifestDir, and certificatesDir
func (GenericClient) GetStatus ¶
func (c GenericClient) GetStatus() (*clientv3.StatusResponse, error)
GetStatus gets server status
func (GenericClient) HasTLS ¶
func (c GenericClient) HasTLS() bool
HasTLS returns true if etcd is configured for TLS
func (GenericClient) WaitForStatus ¶
func (c GenericClient) WaitForStatus(delay time.Duration, retries int, retryInterval time.Duration) (*clientv3.StatusResponse, error)
WaitForStatus returns a StatusResponse after an initial delay and retry attempts
Click to show internal directories.
Click to hide internal directories.