Versions in this module Expand all Collapse all v0 v0.1.0 Aug 3, 2021 Changes in this version + const DBSchemaBatchIndex + const DBSchemaCode + const DBSchemaYuj + var DBSchemaCurrent = DBSchemaBatchIndex + var ErrInvalidMode = errors.New("invalid mode") + var ErrOverwrite = errors.New("index already exists - double issuance on immutable batch") + type DB struct + func New(path string, baseKey []byte, ss storage.StateStorer, o *Options, ...) (db *DB, err error) + func (db *DB) Close() (err error) + func (db *DB) DebugIndices() (indexInfo map[string]int, err error) + func (db *DB) Export(w io.Writer) (count int64, err error) + func (db *DB) Get(ctx context.Context, mode storage.ModeGet, addr swarm.Address) (ch swarm.Chunk, err error) + func (db *DB) GetMulti(ctx context.Context, mode storage.ModeGet, addrs ...swarm.Address) (chunks []swarm.Chunk, err error) + func (db *DB) Has(ctx context.Context, addr swarm.Address) (bool, error) + func (db *DB) HasMulti(ctx context.Context, addrs ...swarm.Address) ([]bool, error) + func (db *DB) Import(ctx context.Context, r io.Reader) (count int64, err error) + func (db *DB) LastPullSubscriptionBinID(bin uint8) (id uint64, err error) + func (db *DB) Metrics() []prometheus.Collector + func (db *DB) Put(ctx context.Context, mode storage.ModePut, chs ...swarm.Chunk) (exist []bool, err error) + func (db *DB) Set(ctx context.Context, mode storage.ModeSet, addrs ...swarm.Address) (err error) + func (db *DB) SubscribePull(ctx context.Context, bin uint8, since, until uint64) (c <-chan storage.Descriptor, closed <-chan struct{}, stop func()) + func (db *DB) SubscribePush(ctx context.Context) (c <-chan swarm.Chunk, stop func()) + func (db *DB) UnreserveBatch(id []byte, radius uint8) (evicted uint64, err error) + type Options struct + BlockCacheCapacity uint64 + Capacity uint64 + DisableSeeksCompaction bool + MetricsPrefix string + OpenFilesLimit uint64 + ReserveCapacity uint64 + Tags *tags.Tags + UnreserveFunc func(postage.UnreserveIteratorFn) error + WriteBufferSize uint64