Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterCloser ¶
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 ¶
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.