client

package
v0.32.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterCloser

type ClusterCloser interface {
	clientv3.Cluster
	io.Closer
}

ClusterCloser adds io.Closer to the clientv3.Cluster interface to enable closing the underlying resources.

type Factory

type Factory interface {
	NewCluster() (ClusterCloser, error)
	NewKV() (KVCloser, error)
	NewMaintenance() (MaintenanceCloser, error)
	NewWatcher() (clientv3.Watcher, error) // clientv3.Watcher already supports io.Closer
}

Factory interface defines a way to construct and close the client objects for different ETCD API.

type KVCloser

type KVCloser interface {
	clientv3.KV
	io.Closer
}

KVCloser adds io.Closer to the clientv3.KV interface to enable closing the underlying resources.

type MaintenanceCloser

type MaintenanceCloser interface {
	clientv3.Maintenance
	io.Closer
}

MaintenanceCloser adds io.Closer to the clientv3.Maintenance interface to enable closing the underlying resources.

type Option

type Option interface {
	ApplyTo(*Options)
}

Option is an interface for changing configuration in client options.

type Options

type Options struct {
	UseServiceEndpoints bool
}

Options contains options used by the client.

type UseServiceEndpoints

type UseServiceEndpoints bool

UseServiceEndpoints instructs the client to use the service endpoints instead of endpoints.

func (UseServiceEndpoints) ApplyTo

func (u UseServiceEndpoints) ApplyTo(opt *Options)

ApplyTo applies this configuration to the given options.

Jump to

Keyboard shortcuts

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