vault: Index | Files

package zookeeper

import ""


Package Files



const (
    // ZKNodeFilePrefix is prefixed to any "files" in ZooKeeper,
    // so that they do not collide with directory entries. Otherwise,
    // we cannot delete a file if the path is a full-prefix of another
    // key.
    ZKNodeFilePrefix = "_"

func NewZooKeeperBackend Uses

func NewZooKeeperBackend(conf map[string]string, logger log.Logger) (physical.Backend, error)

NewZooKeeperBackend constructs a ZooKeeper backend using the given API client and the prefix in the KV store.

type ZooKeeperBackend Uses

type ZooKeeperBackend struct {
    // contains filtered or unexported fields

ZooKeeperBackend is a physical backend that stores data at specific prefix within ZooKeeper. It is used in production situations as it allows Vault to run on multiple machines in a highly-available manner.

func (*ZooKeeperBackend) Delete Uses

func (c *ZooKeeperBackend) Delete(ctx context.Context, key string) error

Delete is used to permanently delete an entry

func (*ZooKeeperBackend) Get Uses

func (c *ZooKeeperBackend) Get(ctx context.Context, key string) (*physical.Entry, error)

Get is used to fetch an entry

func (*ZooKeeperBackend) HAEnabled Uses

func (c *ZooKeeperBackend) HAEnabled() bool

HAEnabled indicates whether the HA functionality should be exposed. Currently always returns true.

func (*ZooKeeperBackend) List Uses

func (c *ZooKeeperBackend) List(ctx context.Context, prefix string) ([]string, error)

List is used ot list all the keys under a given prefix, up to the next prefix.

func (*ZooKeeperBackend) LockWith Uses

func (c *ZooKeeperBackend) LockWith(key, value string) (physical.Lock, error)

LockWith is used for mutual exclusion based on the given key.

func (*ZooKeeperBackend) Put Uses

func (c *ZooKeeperBackend) Put(ctx context.Context, entry *physical.Entry) error

Put is used to insert or update an entry

type ZooKeeperHALock Uses

type ZooKeeperHALock struct {
    // contains filtered or unexported fields

ZooKeeperHALock is a ZooKeeper Lock implementation for the HABackend

func (*ZooKeeperHALock) Lock Uses

func (i *ZooKeeperHALock) Lock(stopCh <-chan struct{}) (<-chan struct{}, error)

func (*ZooKeeperHALock) Unlock Uses

func (i *ZooKeeperHALock) Unlock() error

func (*ZooKeeperHALock) Value Uses

func (i *ZooKeeperHALock) Value() (bool, string, error)

Package zookeeper imports 18 packages (graph) and is imported by 4 packages. Updated 2019-04-30. Refresh now. Tools for package owners.