Documentation ¶
Overview ¶
Package retrystore provides a datastore wrapper which allows to retry operations.
Index ¶
- type Datastore
- func (d *Datastore) DiskUsage(ctx context.Context) (uint64, error)
- func (d *Datastore) Get(ctx context.Context, k ds.Key) ([]byte, error)
- func (d *Datastore) GetSize(ctx context.Context, k ds.Key) (int, error)
- func (d *Datastore) Has(ctx context.Context, k ds.Key) (bool, error)
- func (d *Datastore) Put(ctx context.Context, k ds.Key, val []byte) error
- func (d *Datastore) Sync(ctx context.Context, prefix ds.Key) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Datastore ¶
Datastore wraps a Batching datastore with a user-provided TempErrorFunc -which determines if an error is a temporal error and thus, worth retrying-, an amount of Retries -which specify how many times to retry an operation after a temporal error- and a base Delay, which is multiplied by the current retry and performs a pause before attempting the operation again.
Click to show internal directories.
Click to hide internal directories.