Documentation ¶
Overview ¶
Package 'dir' implements the "directory backend". It uses a regular filesystem directories/files to store Teleport auth server state.
Limitations:
- key names cannot start with '.' (dot)
Index ¶
- func GetName() string
- func New(params backend.Params) (backend.Backend, error)
- type Backend
- func (bk *Backend) AcquireLock(token string, ttl time.Duration) (err error)
- func (b *Backend) Clock() clockwork.Clock
- func (bk *Backend) Close() error
- func (bk *Backend) CreateVal(bucket []string, key string, val []byte, ttl time.Duration) error
- func (bk *Backend) DeleteBucket(parent []string, bucket string) error
- func (bk *Backend) DeleteKey(bucket []string, key string) error
- func (bk *Backend) GetKeys(bucket []string) ([]string, error)
- func (bk *Backend) GetVal(bucket []string, key string) ([]byte, error)
- func (bk *Backend) ReleaseLock(token string) (err error)
- func (bk *Backend) UpsertVal(bucket []string, key string, val []byte, ttl time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Backend ¶
type Backend struct { // RootDir is the root (home) directory where the backend // stores all the data. RootDir string // InternalClock is a test-friendly source of current time InternalClock clockwork.Clock *log.Entry }
fs.Backend implements backend.Backend interface using a regular POSIX-style filesystem
func (*Backend) AcquireLock ¶
AcquireLock grabs a lock that will be released automatically in TTL
func (*Backend) CreateVal ¶
CreateVal creates value with a given TTL and key in the bucket if the value already exists, returns AlreadyExistsError
func (*Backend) DeleteBucket ¶
DeleteBucket deletes the bucket by a given path
func (*Backend) ReleaseLock ¶
ReleaseLock forces lock release before TTL
Click to show internal directories.
Click to hide internal directories.