Documentation ¶
Index ¶
- Variables
- func NewInmem(_ map[string]string, logger log.Logger) (physical.Backend, error)
- func NewTransactionalInmem(_ map[string]string, logger log.Logger) (physical.Backend, error)
- type IBackend
- func (i *IBackend) Delete(ctx context.Context, key string) error
- func (i *IBackend) DeleteInternal(ctx context.Context, key string) error
- func (i *IBackend) FailDelete(fail bool)
- func (i *IBackend) FailGet(fail bool)
- func (i *IBackend) FailList(fail bool)
- func (i *IBackend) FailPut(fail bool)
- func (i *IBackend) Get(ctx context.Context, key string) (*physical.Entry, error)
- func (i *IBackend) GetInternal(ctx context.Context, key string) (*physical.Entry, error)
- func (i *IBackend) List(ctx context.Context, prefix string) ([]string, error)
- func (i *IBackend) ListInternal(ctx context.Context, prefix string) ([]string, error)
- func (i *IBackend) Put(ctx context.Context, entry *physical.Entry) error
- func (i *IBackend) PutInternal(ctx context.Context, entry *physical.Entry) error
- type TransactionalInmemBackend
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PutDisabledError = errors.New("put operations disabled in inmem backend") GetDisabledError = errors.New("get operations disabled in inmem backend") DeleteDisabledError = errors.New("delete operations disabled in inmem backend") ListDisabledError = errors.New("list operations disabled in inmem backend") )
Functions ¶
Types ¶
type IBackend ¶
InmemBackend is an in-memory only physical backend. It is useful for testing and development situations where the data is not expected to be durable.
func (*IBackend) DeleteInternal ¶
func (*IBackend) FailDelete ¶
func (*IBackend) GetInternal ¶
func (*IBackend) List ¶
List is used to list all the keys under a given prefix, up to the next prefix.
func (*IBackend) ListInternal ¶
type TransactionalInmemBackend ¶
type TransactionalInmemBackend struct {
IBackend
}
func (*TransactionalInmemBackend) Transaction ¶
func (t *TransactionalInmemBackend) Transaction(ctx context.Context, txns []*physical.TxnEntry) error
Implements the transaction interface
Click to show internal directories.
Click to hide internal directories.