consul

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store is a consul-backed store

func New

func New(host, prefix, datacenter, token string) (*Store, error)

New creates a new consul store

func (*Store) Available

func (s *Store) Available(ctx context.Context) error

Available will check if this backend is useable

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, name string) error

Delete removes a single entry

func (*Store) Exists

func (s *Store) Exists(ctx context.Context, name string) bool

Exists checks if a given entry exists

func (*Store) Fsck

func (s *Store) Fsck(ctx context.Context) error

Fsck always returns nil

func (*Store) Get

func (s *Store) Get(ctx context.Context, name string) ([]byte, error)

Get retrieves a single entry

func (*Store) IsDir

func (s *Store) IsDir(ctx context.Context, name string) bool

IsDir checks if the given entry is a directory

func (*Store) List

func (s *Store) List(ctx context.Context, _ string) ([]string, error)

List lists all entries matching the given prefix

func (*Store) Name

func (s *Store) Name() string

Name returns consul

func (*Store) Prune

func (s *Store) Prune(ctx context.Context, prefix string) error

Prune removes the given tree

func (*Store) Set

func (s *Store) Set(ctx context.Context, name string, value []byte) error

Set writes a single entry

func (*Store) String added in v1.7.2

func (s *Store) String() string

String implements fmt.Stringer

func (*Store) Version

func (s *Store) Version(context.Context) semver.Version

Version returns 1.0.0

Jump to

Keyboard shortcuts

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