Documentation ¶
Index ¶
- type ChunkItem
- type Reserve
- func (r *Reserve) AddSize(diff int)
- func (r *Reserve) Capacity() int
- func (r *Reserve) DeleteChunk(ctx context.Context, store internal.Storage, chunkAddress swarm.Address, ...) error
- func (r *Reserve) Get(ctx context.Context, storage internal.Storage, addr swarm.Address, ...) (swarm.Chunk, error)
- func (r *Reserve) Has(store storage.Store, addr swarm.Address, batchID []byte) (bool, error)
- func (r *Reserve) IsWithinCapacity() bool
- func (r *Reserve) IterateBatchBin(ctx context.Context, store internal.Storage, bin uint8, batchID []byte, ...) error
- func (r *Reserve) IterateBin(store storage.Store, bin uint8, startBinID uint64, ...) error
- func (r *Reserve) IterateChunks(store internal.Storage, startBin uint8, cb func(swarm.Chunk) (bool, error)) error
- func (r *Reserve) IterateChunksItems(store internal.Storage, startBin uint8, cb func(ChunkItem) (bool, error)) error
- func (r *Reserve) LastBinIDs(store storage.Store) ([]uint64, error)
- func (r *Reserve) Put(ctx context.Context, store internal.Storage, chunk swarm.Chunk) (bool, error)
- func (r *Reserve) Radius() uint8
- func (r *Reserve) SetRadius(store storage.Store, rad uint8) error
- func (r *Reserve) Size() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reserve ¶
type Reserve struct {
// contains filtered or unexported fields
}
func (*Reserve) DeleteChunk ¶
func (r *Reserve) DeleteChunk( ctx context.Context, store internal.Storage, chunkAddress swarm.Address, batchID []byte, ) error
DeleteChunk is the exposed function to delete a chunk from the reserve.
func (*Reserve) IsWithinCapacity ¶
func (*Reserve) IterateBatchBin ¶
func (r *Reserve) IterateBatchBin( ctx context.Context, store internal.Storage, bin uint8, batchID []byte, cb func(swarm.Address) (bool, error), ) error
IterateBatchBin iterates over all chunks pertaining to the batch in the particular bin. The callback function should return true to stop the iteration.
func (*Reserve) IterateBin ¶
func (*Reserve) IterateChunks ¶
func (*Reserve) IterateChunksItems ¶
Click to show internal directories.
Click to hide internal directories.