Documentation ¶
Overview ¶
Package boltbk implements BoltDB backed backend for standalone instances This is a legacy backend which only exists for backward compatibility purposes
Production Teleport clusters should be using either etcd or DynamoDB backends.
Index ¶
- func Exists(path string) (bool, error)
- func GetBucket(b *bolt.Tx, buckets []string) (*bolt.Bucket, error)
- func GetName() string
- func UpsertBucket(b *bolt.Tx, buckets []string) (*bolt.Bucket, error)
- type BoltBackend
- func (b *BoltBackend) AcquireLock(token string, ttl time.Duration) error
- func (b *BoltBackend) Clock() clockwork.Clock
- func (b *BoltBackend) Close() error
- func (b *BoltBackend) CompareAndSwapVal(bucket []string, key string, newData []byte, prevData []byte, ...) error
- func (b *BoltBackend) CreateVal(bucket []string, key string, val []byte, ttl time.Duration) error
- func (b *BoltBackend) DeleteBucket(path []string, bucket string) error
- func (b *BoltBackend) DeleteKey(path []string, key string) error
- func (b *BoltBackend) Export() ([]backend.Item, error)
- func (b *BoltBackend) GetItems(path []string, opts ...legacy.OpOption) ([]legacy.Item, error)
- func (b *BoltBackend) GetKeys(path []string) ([]string, error)
- func (b *BoltBackend) GetVal(path []string, key string) ([]byte, error)
- func (b *BoltBackend) ReleaseLock(token string) error
- func (bk *BoltBackend) UpsertItems(bucket []string, items []legacy.Item) error
- func (b *BoltBackend) UpsertVal(path []string, key string, val []byte, ttl time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BoltBackend ¶
BoltBackend is a boltdb-based backend used in tests and standalone mode
func New ¶
func New(params legacy.Params) (*BoltBackend, error)
New initializes and returns a fully created BoltDB backend. It's a properly implemented Backend.NewFunc, part of a backend API
func (*BoltBackend) AcquireLock ¶
func (b *BoltBackend) AcquireLock(token string, ttl time.Duration) error
func (*BoltBackend) Clock ¶
func (b *BoltBackend) Clock() clockwork.Clock
Clock returns clock assigned to the backend
func (*BoltBackend) CompareAndSwapVal ¶
func (b *BoltBackend) CompareAndSwapVal(bucket []string, key string, newData []byte, prevData []byte, ttl time.Duration) error
CompareAndSwapVal compares and swap values in atomic operation, succeeds if prevData matches the value stored in the databases, requires prevData as a non-empty value. Returns trace.CompareFailed in case if value did not match
func (*BoltBackend) DeleteBucket ¶
func (b *BoltBackend) DeleteBucket(path []string, bucket string) error
func (*BoltBackend) Export ¶
func (b *BoltBackend) Export() ([]backend.Item, error)
Export exports all items from the backend in new backend Items
func (*BoltBackend) GetVal ¶
func (b *BoltBackend) GetVal(path []string, key string) ([]byte, error)
func (*BoltBackend) ReleaseLock ¶
func (b *BoltBackend) ReleaseLock(token string) error
func (*BoltBackend) UpsertItems ¶
func (bk *BoltBackend) UpsertItems(bucket []string, items []legacy.Item) error