discovery

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNetwork      = errors.New("pachyderm: network failure")
	ErrNotFound     = errors.New("pachyderm: Not found")
	ErrValue        = errors.New("pachyderm: Found value instead of directory")
	ErrDirectory    = errors.New("pachyderm: Found directory instead of value")
	ErrExists       = errors.New("pachyderm: Key already exists")
	ErrPrecondition = errors.New("pachyderm: Precondition not met")
)

Functions

This section is empty.

Types

type Client

type Client interface {
	// Close closes the underlying connection
	// Errors: ErrNetwork
	Close() error
	// Get gets the value of a key
	// Errors: ErrNetwork, ErrNotFound, ErrDirectory
	Get(key string) (string, error)
	// GetAll returns all of the keys in a directory and its subdirectories as
	// a map from absolute keys to values.
	// Errors: ErrNetwork
	GetAll(key string) (map[string]string, error)
	// Set sets the value for a key
	// Errors: ErrNetwork, ErrDirectory
	Set(key string, value string) error
	// Delete deletes a key.
	// Errors: ErrNetwork, ErrNotFound, ErrDirectory
	Delete(key string) error
	// Create is like Set but only succeeds if the key doesn't already exist
	// Errors: ErrNetwork, ErrExists
	Create(key string, value string) error
	// CheckAndSet is like Set but only succeeds if the key is already set to oldValue
	// Errors: ErrNetwork, ErrNotFound, ErrDirectory, ErrPrecondition
	CheckAndSet(key string, value string, oldValue string) error
}

func NewEtcdClient

func NewEtcdClient(addresses ...string) Client

func NewMockClient

func NewMockClient() Client

Jump to

Keyboard shortcuts

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