etcd

package module
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2023 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// etcd endpoints
	Endpoints []string

	// timeout
	DialTimeout time.Duration

	// prefix request option
	Prefix bool

	// limit request option
	Limit bool

	// number of limited pairs
	NLimit int64

	// key, key with prefix, etc.
	Key string
}

type Etcd

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

Etcd implements the etcd config provider.

func Provider

func Provider(cfg Config) (*Etcd, error)

Provider returns a provider that takes etcd config.

func (*Etcd) Read

func (e *Etcd) Read() (map[string]interface{}, error)

Read returns a nested config map.

func (*Etcd) ReadBytes

func (e *Etcd) ReadBytes() ([]byte, error)

ReadBytes is not supported by etcd provider.

func (*Etcd) Watch

func (e *Etcd) Watch(cb func(event interface{}, err error)) error

Jump to

Keyboard shortcuts

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