etcd

package
v0.0.0-...-9649366 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientOptFn

type ClientOptFn func(etcdclient.Options) etcdclient.Options

ClientOptFn updates etcdclient.Option with any custom configs.

type EmbeddedKV

type EmbeddedKV interface {
	io.Closer

	// Start starts the embedded KV.
	Start() error

	// Endpoints returns the active endpoints for the embedded KV.
	Endpoints() []string

	// ConfigServiceClient returns a m3cluster wrapper
	// around the embedded KV.
	ConfigServiceClient(fns ...ClientOptFn) (client.Client, error)
}

EmbeddedKV is an embedded etcd server wrapped around by m3cluster utilities.

func New

func New(opts Options) (EmbeddedKV, error)

New creates a new EmbeddedKV

type Options

type Options interface {
	// SetInstrumentOptions sets the instrumentation options.
	SetInstrumentOptions(value instrument.Options) Options

	// InstrumentOptions returns the instrumentation options.
	InstrumentOptions() instrument.Options

	// SetDir sets the working directory.
	SetDir(value string) Options

	// Dir returns the working directory.
	Dir() string

	// SetInitTimeout sets the init timeout.
	SetInitTimeout(value time.Duration) Options

	// InitTimeout returns the init timeout.
	InitTimeout() time.Duration

	// SetServiceID sets the service id for KV operations.
	SetServiceID(value string) Options

	// ServiceID returns the service id for KV operations.
	ServiceID() string

	// SetEnvironment sets the environment for KV operations.
	SetEnvironment(value string) Options

	// Environment returns the environment for KV operations.
	Environment() string

	// SetZone sets the zone for KV operations.
	SetZone(value string) Options

	// Zone returns the zone for KV operations.
	Zone() string
}

Options specify the knobs to control the embedded KV.

func NewOptions

func NewOptions() Options

NewOptions returns a new options

Jump to

Keyboard shortcuts

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