Documentation ¶
Index ¶
- type MultiIndexSorted
- func (m *MultiIndexSorted) BucketCount() uint32
- func (m *MultiIndexSorted) Codec() multicodec.Code
- func (m *MultiIndexSorted) ForEach(f func(mh multihash.Multihash, offset uint64) error) error
- func (m *MultiIndexSorted) GetAll(c cid.Cid, fn func(uint64) bool) error
- func (m *MultiIndexSorted) GetBucketRecords(index uint32) ([]*index.Record, error)
- func (m *MultiIndexSorted) Load(records []index.Record) error
- func (m *MultiIndexSorted) Marshal(w io.Writer) (uint64, error)
- func (m *MultiIndexSorted) TotalRecordCount() uint32
- func (m *MultiIndexSorted) Unmarshal(r io.Reader) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MultiIndexSorted ¶
type MultiIndexSorted struct {
// contains filtered or unexported fields
}
func NewMultiIndexSorted ¶
func NewMultiIndexSorted(sizeOfBucket uint32) *MultiIndexSorted
NewMultiIndexSorted creates a new MultiIndexSorted with the specified bucket size.
func (*MultiIndexSorted) BucketCount ¶
func (m *MultiIndexSorted) BucketCount() uint32
BucketCount returns the number of buckets in the MultiIndex.
func (*MultiIndexSorted) Codec ¶
func (m *MultiIndexSorted) Codec() multicodec.Code
Codec returns the multicodec code for the MultiIndex.
func (*MultiIndexSorted) ForEach ¶
func (m *MultiIndexSorted) ForEach(f func(mh multihash.Multihash, offset uint64) error) error
ForEach iterates over all records in the MultiIndex and calls the provided function for each one.
func (*MultiIndexSorted) GetAll ¶
func (m *MultiIndexSorted) GetAll(c cid.Cid, fn func(uint64) bool) error
GetAll searches for all occurrences of a CID and calls the provided function for each one.
func (*MultiIndexSorted) GetBucketRecords ¶
func (m *MultiIndexSorted) GetBucketRecords(index uint32) ([]*index.Record, error)
GetBucketRecords returns the records of a specific bucket by its index.
func (*MultiIndexSorted) Load ¶
func (m *MultiIndexSorted) Load(records []index.Record) error
Load loads a list of records into the MultiIndex.
func (*MultiIndexSorted) Marshal ¶
func (m *MultiIndexSorted) Marshal(w io.Writer) (uint64, error)
Marshal writes the MultiIndex struct to a writer.
func (*MultiIndexSorted) TotalRecordCount ¶
func (m *MultiIndexSorted) TotalRecordCount() uint32
TotalRecordCount returns the total number of records in the MultiIndex.