Back to godoc.org
github.com/hashicorp/vault/sdk/physical/file

package file

v0.1.13
Latest Go to latest
Published: Jul 25, 2019 | License: MPL-2.0 | Module: github.com/hashicorp/vault/sdk

Index

func NewFileBackend

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

NewFileBackend constructs a FileBackend using the given directory

func NewTransactionalFileBackend

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

type FileBackend

type FileBackend struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

FileBackend is a physical backend that stores data on disk at a given file path. It can be used for durable single server situations, or to develop locally where durability is not critical.

WARNING: the file backend implementation is currently extremely unsafe and non-performant. It is meant mostly for local testing and development. It can be improved in the future.

func (*FileBackend) Delete

func (b *FileBackend) Delete(ctx context.Context, path string) error

func (*FileBackend) DeleteInternal

func (b *FileBackend) DeleteInternal(ctx context.Context, path string) error

func (*FileBackend) Get

func (b *FileBackend) Get(ctx context.Context, k string) (*physical.Entry, error)

func (*FileBackend) GetInternal

func (b *FileBackend) GetInternal(ctx context.Context, k string) (*physical.Entry, error)

func (*FileBackend) List

func (b *FileBackend) List(ctx context.Context, prefix string) ([]string, error)

func (*FileBackend) ListInternal

func (b *FileBackend) ListInternal(ctx context.Context, prefix string) ([]string, error)

func (*FileBackend) Put

func (b *FileBackend) Put(ctx context.Context, entry *physical.Entry) error

func (*FileBackend) PutInternal

func (b *FileBackend) PutInternal(ctx context.Context, entry *physical.Entry) error

type TransactionalFileBackend

type TransactionalFileBackend struct {
	FileBackend
}

func (*TransactionalFileBackend) Transaction

func (b *TransactionalFileBackend) Transaction(ctx context.Context, txns []*physical.TxnEntry) error
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier