consul

package
v0.0.0-...-ebe2018 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2018 License: MIT Imports: 8 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) Get

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

func (*ConsulStore) GetClient

func (e *ConsulStore) GetClient() *api.Client

func (*ConsulStore) GetKey

func (e *ConsulStore) GetKey(key string) ([]byte, 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) Setup

func (e *ConsulStore) Setup() error

func (*ConsulStore) Teardown

func (e *ConsulStore) Teardown() error

func (*ConsulStore) Unlock

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

Jump to

Keyboard shortcuts

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