Documentation ¶
Index ¶
- type ChunkStore
- func (c *ChunkStore) Close() error
- func (c *ChunkStore) Delete(_ context.Context, addr swarm.Address) error
- func (c *ChunkStore) Get(_ context.Context, addr swarm.Address) (swarm.Chunk, error)
- func (c *ChunkStore) Has(_ context.Context, addr swarm.Address) (bool, error)
- func (c *ChunkStore) Iterate(_ context.Context, fn storage.IterateChunkFn) error
- func (c *ChunkStore) Put(_ context.Context, ch swarm.Chunk) error
- type TxChunkStore
- func (s *TxChunkStore) Commit() error
- func (s *TxChunkStore) Delete(ctx context.Context, addr swarm.Address) error
- func (s *TxChunkStore) NewTx(state *storage.TxState) storage.TxChunkStore
- func (s *TxChunkStore) Put(ctx context.Context, chunk swarm.Chunk) (err error)
- func (s *TxChunkStore) Rollback() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChunkStore ¶
type ChunkStore struct {
// contains filtered or unexported fields
}
func New ¶
func New() *ChunkStore
func (*ChunkStore) Close ¶
func (c *ChunkStore) Close() error
func (*ChunkStore) Iterate ¶
func (c *ChunkStore) Iterate(_ context.Context, fn storage.IterateChunkFn) error
type TxChunkStore ¶
type TxChunkStore struct { *storage.TxChunkStoreBase // contains filtered or unexported fields }
TxChunkStore is an implementation of in-memory Store where all Store operations are done in a transaction.
func NewTxChunkStore ¶
func NewTxChunkStore(store storage.ChunkStore) *TxChunkStore
NewTxChunkStore returns a new TxChunkStore instance backed by the given chunk store.
func (*TxChunkStore) Commit ¶
func (s *TxChunkStore) Commit() error
Commit implements the Tx interface.
func (*TxChunkStore) NewTx ¶
func (s *TxChunkStore) NewTx(state *storage.TxState) storage.TxChunkStore
NewTx implements the TxStore interface.
func (*TxChunkStore) Rollback ¶
func (s *TxChunkStore) Rollback() error
Rollback implements the Tx interface.
Click to show internal directories.
Click to hide internal directories.