Documentation ¶
Index ¶
- Constants
- Variables
- type Action
- type EtcdStoreClient
- func (r *EtcdStoreClient) Close()
- func (r *EtcdStoreClient) Delete(key string) error
- func (r *EtcdStoreClient) Get(key string) (*Node, error)
- func (r *EtcdStoreClient) List(path string) ([]*Node, error)
- func (e *EtcdStoreClient) Paths(path string, paths *[]string) ([]string, error)
- func (r *EtcdStoreClient) RemovePath(path string) error
- func (r *EtcdStoreClient) Set(key string, value string) error
- func (r *EtcdStoreClient) Unwatch(key string)
- func (r *EtcdStoreClient) Watch(key string)
- type Node
- type NodeChange
- type NodeUpdateChannel
- type Store
Constants ¶
View Source
const ( UNKNOWN = 0 CHANGED = 1 DELETED = 2 )
View Source
const (
ETCD_PREFIX = "etcd://"
)
View Source
const VERBOSE_LEVEL = 5
Variables ¶
View Source
var ( InvalidUrlErr = errors.New("Invalid URI error, please check backend url") InvalidDirectoryErr = errors.New("Invalid directory specified") )
View Source
var EtcdOptions struct { // contains filtered or unexported fields }
etcd options for TLS support
Functions ¶
This section is empty.
Types ¶
type EtcdStoreClient ¶
type EtcdStoreClient struct { /* a lock for the watcher map */ sync.RWMutex // contains filtered or unexported fields }
func (*EtcdStoreClient) Close ¶
func (r *EtcdStoreClient) Close()
func (*EtcdStoreClient) Delete ¶
func (r *EtcdStoreClient) Delete(key string) error
func (*EtcdStoreClient) Paths ¶
func (e *EtcdStoreClient) Paths(path string, paths *[]string) ([]string, error)
func (*EtcdStoreClient) RemovePath ¶
func (r *EtcdStoreClient) RemovePath(path string) error
func (*EtcdStoreClient) Unwatch ¶
func (r *EtcdStoreClient) Unwatch(key string)
func (*EtcdStoreClient) Watch ¶
func (r *EtcdStoreClient) Watch(key string)
type Node ¶
type NodeChange ¶
type NodeUpdateChannel ¶
type NodeUpdateChannel chan NodeChange
type Store ¶
type Store interface { /* retrieve a key from the store */ Get(key string) (*Node, error) /* List all the keys under a path */ Paths(path string, paths *[]string) ([]string, error) /* watch for changes on a key */ Watch(key string) /* remove a key from being watched */ Unwatch(key string) /* Get a list of all the nodes under the path */ List(path string) ([]*Node, error) /* set a key in the store */ Set(key string, value string) error /* delete a key from the store */ Delete(key string) error /* recursively delete a path */ RemovePath(path string) error /* release all the resources */ Close() }
func NewEtcdStoreClient ¶
func NewEtcdStoreClient(location *url.URL, channel NodeUpdateChannel) (Store, error)
Click to show internal directories.
Click to hide internal directories.