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() 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) (*common.Beacon, error)
- func (b *BoltStore) Last(ctx context.Context) (*common.Beacon, error)
- func (b *BoltStore) Len(ctx context.Context) (int, error)
- func (b *BoltStore) Put(ctx context.Context, beacon *common.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 ¶
BoltStore implements the Store interface using the kv storage boltdb (native golang implementation). Internally, Beacons are stored as JSON-encoded in the db file.
Click to show internal directories.
Click to hide internal directories.