etcd

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2015 License: Apache-2.0, Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigBackend

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

ConfigBackend is an etcd-based implementation of the config.Backend interface

func NewConfigBackend

func NewConfigBackend() (*ConfigBackend, error)

NewConfigBackend returns this etcd-based implementation of the config.Backend interface

func (*ConfigBackend) Delete

func (cb *ConfigBackend) Delete(key string) error

Delete a key/value pair by key from etcd

func (*ConfigBackend) Get

func (cb *ConfigBackend) Get(key string) (string, error)

Get a value by key from etcd

func (*ConfigBackend) GetRecursive

func (cb *ConfigBackend) GetRecursive(key string) ([]*model.ConfigNode, error)

GetRecursive returns a slice of all key/value pairs "under" a specified key in etcd

func (*ConfigBackend) GetWithDefault added in v1.10.0

func (cb *ConfigBackend) GetWithDefault(key string, defaultValue string) (string, error)

GetWithDefault gets a value by key from etcd and return a default value if not found

func (*ConfigBackend) Set

func (cb *ConfigBackend) Set(key string, value string) (string, error)

Set a value for the specified key in etcd

func (*ConfigBackend) SetWithTTL

func (cb *ConfigBackend) SetWithTTL(key string, value string, ttl uint64) (string, error)

SetWithTTL sets a value for the specified key in etcd-- with a time to live

Jump to

Keyboard shortcuts

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