consul

package
v0.2.2-linux Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsulStore

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

func MakeConsulStore

func MakeConsulStore(addr ...string) *ConsulStore

func (*ConsulStore) DeleteKeys

func (e *ConsulStore) DeleteKeys(prefix string) error

func (*ConsulStore) Get

func (e *ConsulStore) Get(reader types.ReaderWriter, tree *types.Tree) error

func (*ConsulStore) GetKey

func (e *ConsulStore) GetKey(key string) ([]byte, error)

func (*ConsulStore) GetKeys

func (e *ConsulStore) GetKeys(prefix string, separator string) ([]string, error)

func (*ConsulStore) GetVersion

func (e *ConsulStore) GetVersion(reader types.ReaderWriter, tree *types.Tree, version string) error

func (*ConsulStore) GetVersions

func (e *ConsulStore) GetVersions(reader types.ReaderWriter, tree *types.Tree) ([]string, error)

func (*ConsulStore) Lock

func (e *ConsulStore) Lock(key, s string) error

func (*ConsulStore) Save

func (e *ConsulStore) Save(source types.ReaderWriter, tree *types.Tree) error

Internal method to save Any data under a hierarchy that follows revision control. Example: In a workspace staging, you wish to save a new layout called dc1 saveRevision("staging", "layout", "dc1", {....}) will try to save the following structure workspace/layouts/dc1/latest workspace/layouts/dc1/new_timestamp NOTE: This is an atomic operation, so either everything is written or nothing is. The operation may take its own sweet time before a quorum write is guaranteed.

func (*ConsulStore) SaveKey

func (e *ConsulStore) SaveKey(key string, value []byte) error

func (*ConsulStore) SaveTag

func (e *ConsulStore) SaveTag(source types.ReaderWriter, tree *types.Tree, ts string) error

func (*ConsulStore) Setup

func (e *ConsulStore) Setup() error

func (*ConsulStore) Teardown

func (e *ConsulStore) Teardown() error

func (*ConsulStore) Unlock

func (e *ConsulStore) Unlock(key string) error

Jump to

Keyboard shortcuts

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