Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrDbClosed is used to signal the underlying database was closed ErrDbClosed = errors.New("db closed") )
Functions ¶
This section is empty.
Types ¶
type Storer ¶
type Storer interface { // IntervalChunks collects chunk for a requested interval. IntervalChunks(ctx context.Context, bin uint8, from, to uint64, limit int) (chunks []swarm.Address, topmost uint64, err error) // Cursors gets the last BinID for every bin in the local storage Cursors(ctx context.Context) ([]uint64, error) // Get chunks. Get(ctx context.Context, mode storage.ModeGet, addrs ...swarm.Address) ([]swarm.Chunk, error) // Put chunks. Put(ctx context.Context, mode storage.ModePut, chs ...swarm.Chunk) error // Set chunks. Set(ctx context.Context, mode storage.ModeSet, addrs ...swarm.Address) error // Has chunks. Has(ctx context.Context, addr swarm.Address) (bool, error) }
Storer is a thin wrapper around storage.Storer. It is used in order to collect and provide information about chunks currently present in the local store.
Click to show internal directories.
Click to hide internal directories.