Documentation
¶
Index ¶
- Constants
- Variables
- func Open(root string, opts ...OpenOption) (iface.RBS, error)
- type Group
- func (m *Group) Close() error
- func (m *Group) Delete(ctx context.Context, c []mh.Multihash) error
- func (m *Group) FinDataReload(ctx context.Context) error
- func (m *Group) Finalize(ctx context.Context) error
- func (m *Group) GenCommP() error
- func (m *Group) LoadFilCar(ctx context.Context, f io.Reader, sz int64) error
- func (m *Group) Put(ctx context.Context, b []blocks.Block) (int, error)
- func (m *Group) Sync(ctx context.Context) error
- func (m *Group) Unlink(ctx context.Context, c []mh.Multihash) error
- func (m *Group) View(ctx context.Context, c []mh.Multihash, ...) error
- func (m *Group) WrapStorageProvider() carlog.CarStorageProvider
- type MeteredIndex
- func (m *MeteredIndex) AddGroup(ctx context.Context, mh []multihash.Multihash, sizes []int32, ...) error
- func (m *MeteredIndex) Close() error
- func (m *MeteredIndex) DropGroup(ctx context.Context, mh []multihash.Multihash, group iface.GroupKey) error
- func (m *MeteredIndex) DropGroupForceDelete(ctx context.Context, mh []multihash.Multihash, group iface.GroupKey) error
- func (m *MeteredIndex) EstimateSize(ctx context.Context) (int64, error)
- func (m *MeteredIndex) GetGroups(ctx context.Context, mh []multihash.Multihash, ...) error
- func (m *MeteredIndex) GetSizes(ctx context.Context, mh []multihash.Multihash, cb func([]int32) error) error
- func (m *MeteredIndex) Sync(ctx context.Context) error
- type OpenOption
- type PebbleIndex
- func (i *PebbleIndex) AddGroup(ctx context.Context, mh []multihash.Multihash, sizes []int32, ...) error
- func (i *PebbleIndex) Close() error
- func (i *PebbleIndex) DropGroup(ctx context.Context, mh []multihash.Multihash, group iface.GroupKey) error
- func (i *PebbleIndex) DropGroupForceDelete(ctx context.Context, mh []multihash.Multihash, group iface.GroupKey) error
- func (i *PebbleIndex) EstimateSize(ctx context.Context) (int64, error)
- func (i *PebbleIndex) GetGroups(ctx context.Context, mh []multihash.Multihash, ...) error
- func (i *PebbleIndex) GetSizes(ctx context.Context, mh []multihash.Multihash, cb func([]int32) error) error
- func (i *PebbleIndex) Sync(ctx context.Context) error
Constants ¶
View Source
const MaxLocalGroupCount = 64 // todo user config
Variables ¶
View Source
var ErrOffloaded = fmt.Errorf("group is offloaded")
Functions ¶
Types ¶
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
func (*Group) LoadFilCar ¶
func (*Group) WrapStorageProvider ¶
func (m *Group) WrapStorageProvider() carlog.CarStorageProvider
type MeteredIndex ¶
type MeteredIndex struct {
// contains filtered or unexported fields
}
func NewMeteredIndex ¶
func NewMeteredIndex(sub iface.Index) *MeteredIndex
func (*MeteredIndex) Close ¶
func (m *MeteredIndex) Close() error
func (*MeteredIndex) DropGroupForceDelete ¶
func (*MeteredIndex) EstimateSize ¶
func (m *MeteredIndex) EstimateSize(ctx context.Context) (int64, error)
type OpenOption ¶
type OpenOption func(*openOptions)
func WithDB ¶
func WithDB(db *ributil.RetryDB) OpenOption
type PebbleIndex ¶
type PebbleIndex struct {
// contains filtered or unexported fields
}
PebbleIndex is the top-level index, thread-safe.
func NewPebbleIndex ¶
func NewPebbleIndex(path string) (*PebbleIndex, error)
NewPebbleIndex creates a new Pebble-backed Index.
func (*PebbleIndex) Close ¶
func (i *PebbleIndex) Close() error
func (*PebbleIndex) DropGroupForceDelete ¶
func (i *PebbleIndex) DropGroupForceDelete(ctx context.Context, mh []multihash.Multihash, group iface.GroupKey) error
DropGroupForceDelete revised version of the above code snippet: delete size key entirely
func (*PebbleIndex) EstimateSize ¶
func (i *PebbleIndex) EstimateSize(ctx context.Context) (int64, error)
Click to show internal directories.
Click to hide internal directories.