etcd

package module
v0.0.0-...-b668404 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoRetry = &RetryOptions{UnaryAttempts: 0}

Functions

func DefaultTLSConfig

func DefaultTLSConfig() *tls.Config

func NextKey

func NextKey(key []byte) []byte

func TLSConfigWithCertPool

func TLSConfigWithCertPool(roots *x509.CertPool) *tls.Config

func TLSConfigWithRoot

func TLSConfigWithRoot(cert string) (*tls.Config, error)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cfg Config) *Client

func (*Client) KV

func (*Client) Lease

func (*Client) Logger

func (c *Client) Logger() *zap.Logger

func (*Client) Watch

type Config

type Config struct {
	Endpoints    []string
	TLSConfig    *tls.Config
	Logger       *zap.Logger
	RetryOptions *RetryOptions
	DialContext  func(context.Context, string, string) (net.Conn, error)
}

type RetryOptions

type RetryOptions struct {
	UnaryAttempts int
	Interval      time.Duration
	Jitter        float64
}

Directories

Path Synopsis
internal
codec
This codec is meant to iterop between both normal protobuf messages as well as vtprotbuf optimized messages.
This codec is meant to iterop between both normal protobuf messages as well as vtprotbuf optimized messages.
types

Jump to

Keyboard shortcuts

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