Documentation
¶
Index ¶
- Constants
- type Badger
- func (b *Badger) Add(ctx context.Context, bs []blocks.Block) error
- func (b *Badger) Close(ctx context.Context) error
- func (b *Badger) Delete(ctx context.Context, c cid.Cid) error
- func (b *Badger) DeleteMany(ctx context.Context, toDelete []cid.Cid) error
- func (b *Badger) Get(ctx context.Context, k cid.Cid) (blocks.Block, error)
- func (b *Badger) GetMany(ctx context.Context, ks []cid.Cid) <-chan blocks.Block
- func (b *Badger) IndexGet(ctx context.Context, key string) (value []byte, err error)
- func (b *Badger) IndexPut(ctx context.Context, key string, value []byte) error
- func (b *Badger) Init(a *app.App) error
- func (b *Badger) Name() string
- func (b *Badger) Run(ctx context.Context) error
Constants ¶
View Source
const (
CName = fileblockstore.CName
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Badger ¶
type Badger struct {
// contains filtered or unexported fields
}
Badger implements a block store using BadgerDB. It provides persistent storage of content-addressed blocks with indexing support. Was thinking about sqlite, but it may hard to backup and restore one big file. A few drawbacks - no concurrent writes, not sure that needed.
func (*Badger) DeleteMany ¶
Click to show internal directories.
Click to hide internal directories.