Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddressBytesOrZero ¶
AddressBytesOrZero is a helper which creates a zero buffer of swarm.HashSize. This is required during storing the items in the Store as their serialization formats are strict.
func AddressOrZero ¶
AddressOrZero returns swarm.ZeroAddress if the buf is of zero bytes. The Zero byte buffer is used by the items to serialize their contents and if valid swarm.ZeroAddress entries are allowed.
Types ¶
type BatchOperation ¶
type BatchedStorage ¶
type BatchedStorage interface { Storage BatchOperation }
BatchedStorage groups the Storage and BatchOperation interfaces.
func NewInmemStorage ¶
func NewInmemStorage() (BatchedStorage, func() error)
NewInmemStorage constructs a inmem Storage implementation which can be used for the tests in the internal packages.
type PutterCloserWithReference ¶
type PutterCloserWithReference interface { Put(context.Context, Storage, swarm.Chunk) error Close(Storage, swarm.Address) error Cleanup(BatchOperation) error }
PutterCloserWithReference provides a Putter which can be closed with a root swarm reference associated with this session.