Versions in this module Expand all Collapse all v0 v0.4.2 Jun 28, 2019 v0.4.1 Jun 13, 2019 Changes in this version + const CurrentDbSchema + const DbSchemaHalloween + const DbSchemaNone + const DbSchemaPurity + const DbSchemaSanctuary + var ErrAddressLockTimeout = errors.New("address lock timeout") + var ErrInvalidMode = errors.New("invalid mode") + func IsLegacyDatabase(datadir string) bool + type DB struct + func New(path string, baseKey []byte, o *Options) (db *DB, err error) + func (db *DB) Close() (err error) + func (db *DB) Export(w io.Writer) (count int64, err error) + func (db *DB) Get(ctx context.Context, mode chunk.ModeGet, addr chunk.Address) (ch chunk.Chunk, err error) + func (db *DB) Has(ctx context.Context, addr chunk.Address) (bool, error) + func (db *DB) Import(r io.Reader, legacy bool) (count int64, err error) + func (db *DB) LastPullSubscriptionBinID(bin uint8) (id uint64, err error) + func (db *DB) Put(ctx context.Context, mode chunk.ModePut, ch chunk.Chunk) (exists bool, err error) + func (db *DB) Set(ctx context.Context, mode chunk.ModeSet, addr chunk.Address) (err error) + func (db *DB) SubscribePull(ctx context.Context, bin uint8, since, until uint64) (c <-chan chunk.Descriptor, stop func()) + func (db *DB) SubscribePush(ctx context.Context) (c <-chan chunk.Chunk, stop func()) + type Options struct + Capacity uint64 + MetricsPrefix string + MockStore *mock.NodeStore