Documentation ¶
Index ¶
- Constants
- func NewZooKeeperBackend(conf map[string]string, logger log.Logger) (physical.Backend, error)
- type ZooKeeperBackend
- func (c *ZooKeeperBackend) Delete(ctx context.Context, key string) error
- func (c *ZooKeeperBackend) Get(ctx context.Context, key string) (*physical.Entry, error)
- func (c *ZooKeeperBackend) HAEnabled() bool
- func (c *ZooKeeperBackend) List(ctx context.Context, prefix string) ([]string, error)
- func (c *ZooKeeperBackend) LockWith(key, value string) (physical.Lock, error)
- func (c *ZooKeeperBackend) Put(ctx context.Context, entry *physical.Entry) error
- type ZooKeeperHALock
Constants ¶
View Source
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 = "_" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ZooKeeperBackend ¶
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 ¶
func (c *ZooKeeperBackend) Delete(ctx context.Context, key string) error
Delete is used to permanently delete an entry
func (*ZooKeeperBackend) HAEnabled ¶
func (c *ZooKeeperBackend) HAEnabled() bool
HAEnabled indicates whether the HA functionality should be exposed. Currently always returns true.
func (*ZooKeeperBackend) List ¶
List is used ot list all the keys under a given prefix, up to the next prefix.
type ZooKeeperHALock ¶
type ZooKeeperHALock struct {
// contains filtered or unexported fields
}
ZooKeeperHALock is a ZooKeeper Lock implementation for the HABackend
func (*ZooKeeperHALock) Lock ¶
func (i *ZooKeeperHALock) Lock(stopCh <-chan struct{}) (<-chan struct{}, error)
func (*ZooKeeperHALock) Unlock ¶
func (i *ZooKeeperHALock) Unlock() error
Click to show internal directories.
Click to hide internal directories.