Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
a cluster implementation backed by etcd
func (*Cluster) NewConfigurator ¶
func (cc *Cluster) NewConfigurator(base string) (Configurator, error)
create a configurator for a subtree path.
func (*Cluster) NewJsonPersister ¶
Create a new JsonPersister at the given basepath.
func (*Cluster) NewManager ¶
func (cc *Cluster) NewManager() (Configurator, error)
Returns the Configurator for the manager path
type Configurator ¶
type Configurator interface { Register(pt, value string, ttl int) error Unregister(pt string) GetValues(pt string) ([]string, error) }
A configurator supports operations on a subtree inside of etcd
type Persister ¶
type Persister interface { Path(s string) string Put(k string, v interface{}) error PutTtl(k string, ttl uint64, v interface{}) error Get(k string, v interface{}) error GetAll(sorted, recursive bool, v interface{}) error Remove(k string) error RemoveDir(k string) error Chdir(p string) Persister Ls(p string) ([]string, error) RawClient() *etcd.Client }
A persister can read/write values from/to etcd
Click to show internal directories.
Click to hide internal directories.