etcd

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2015 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorKeyNotFound = 100
	ErrorNodeExist   = 105
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdClient

type EtcdClient interface {
	Create(key string, value string, ttl uint64) (*etcd.Response, error)
	CompareAndSwap(key string, value string, ttl uint64, prevValue string, prevIndex uint64) (*etcd.Response, error)
	Get(key string, sort, recursive bool) (*etcd.Response, error)
}

EtcdClient is a simple wrapper around the underlying etcd client to facilitate testing and minimize the interface between locksmith and the actual etcd client

func NewClient

func NewClient(machines []string, ti *TLSInfo) (EtcdClient, error)

NewClient creates a new EtcdClient

type TLSInfo

type TLSInfo struct {
	CertFile string
	KeyFile  string
	CAFile   string
}

Jump to

Keyboard shortcuts

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