Documentation ¶
Index ¶
- Constants
- func IsATest(ctx context.Context) context.Context
- func NewBoltStore(ctx context.Context, l log.Logger, folder string, opts *bolt.Options) (chain.Store, error)
- type BoltStore
- func (b *BoltStore) Close(context.Context) error
- func (b *BoltStore) Cursor(ctx context.Context, fn func(context.Context, chain.Cursor) error) error
- func (b *BoltStore) Del(ctx context.Context, round uint64) error
- func (b *BoltStore) Get(ctx context.Context, round uint64) (*chain.Beacon, error)
- func (b *BoltStore) Last(ctx context.Context) (*chain.Beacon, error)
- func (b *BoltStore) Len(ctx context.Context) (int, error)
- func (b *BoltStore) Put(ctx context.Context, beacon *chain.Beacon) error
- func (b *BoltStore) SaveTo(ctx context.Context, w io.Writer) error
Constants ¶
View Source
const BoltFileName = "drand.db"
BoltFileName is the name of the file boltdb writes to
View Source
const BoltStoreOpenPerm = 0660
BoltStoreOpenPerm is the permission we will use to read bolt store file from disk
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BoltStore ¶ added in v1.5.3
BoltStore implements the Store interface using the kv storage boltdb (native golang implementation). Internally, Beacons are stored as JSON-encoded in the db file.
func (*BoltStore) Len ¶ added in v1.5.3
Len performs a big scan over the bucket and is _very_ slow - use sparingly!
Click to show internal directories.
Click to hide internal directories.