etcd

package
v0.19.5 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEtcdClient

func GetEtcdClient(ctx context.Context, certificates *Certificates, endpoints ...string) (*clientv3.Client, error)

GetEtcdClient returns an etcd client connected to the specified endpoints. If no endpoints are provided, endpoints are retrieved from the provided runtime config. If the runtime config does not list any endpoints, the default endpoint is used. The returned client should be closed when no longer needed, in order to avoid leaking GRPC client goroutines.

func WaitForEtcdClient

func WaitForEtcdClient(parentCtx context.Context, certificates *Certificates, endpoints ...string) (*clientv3.Client, error)

Types

type Certificates

type Certificates struct {
	CaCert     string
	ServerCert string
	ServerKey  string
}

func EndpointsAndCertificatesFromFlags

func EndpointsAndCertificatesFromFlags(flags []string) ([]string, *Certificates, error)

Jump to

Keyboard shortcuts

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