shards

package module
v0.0.0-...-87f598c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

shards

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct{}

type FieldView

type FieldView struct {
	// contains filtered or unexported fields
}

func NewFieldView

func NewFieldView() *FieldView

func (*FieldView) AddSet

func (vs *FieldView) AddSet(field uint64, view string, ss *Set)

func (*FieldView) AddShard

func (vs *FieldView) AddShard(field uint64, view string, shard uint64)

func (*FieldView) Equals

func (a *FieldView) Equals(b *FieldView) bool

func (*FieldView) Get

func (vs *FieldView) Get(field uint64) map[string]*Set

func (*FieldView) Remove

func (vs *FieldView) Remove(field uint64)

func (*FieldView) String

func (vs *FieldView) String() (r string)

type Holder

type Holder struct{}

type Index

type Index struct {
	Shard map[uint64]*Shard
}

type Key

type Key struct {
	Field uint64
	View  string
}

func (Key) FieldPrefix

func (k Key) FieldPrefix() string

func (Key) Prefix

func (k Key) Prefix() string

type Set

type Set struct {
	// contains filtered or unexported fields
}

func NewSet

func NewSet() *Set

func (*Set) Add

func (ss *Set) Add(shard uint64)

func (*Set) CloneMaybe

func (ss *Set) CloneMaybe() map[uint64]struct{}

CloneMaybe maintains a re-usable readonly version ss.shards that can be returned to multiple goroutine reads as it will never change. A copy is only made once for each change in the shard set.

func (*Set) Equals

func (a *Set) Equals(b *Set) bool

func (*Set) Shards

func (a *Set) Shards() []uint64

func (*Set) String

func (ss *Set) String() (r string)

func (*Set) UnionInPlace

func (a *Set) UnionInPlace(b *Set)

type Shard

type Shard struct {
	HolderPath string
	Shard      uint64
	Open       bool
}

type Tx

type Tx struct {
	// contains filtered or unexported fields
}

func (*Tx) ApplyFilter

func (tx *Tx) ApplyFilter(key Key, ckey uint64, filter roaring.BitmapFilter) (err error)

func (*Tx) ApplyRewriter

func (tx *Tx) ApplyRewriter(key Key, ckey uint64, filter roaring.BitmapRewriter) (err error)

func (*Tx) Commit

func (tx *Tx) Commit() error

func (*Tx) Container

func (tx *Tx) Container(key Key, containerKey uint64) (*roaring.Container, error)

func (*Tx) ContainerIterator

func (tx *Tx) ContainerIterator(key Key, container uint64) (citer roaring.ContainerIterator, found bool, err error)

func (*Tx) Contains

func (tx *Tx) Contains(key Key, v uint64) (exists bool, err error)

func (*Tx) Count

func (tx *Tx) Count(key Key) (uint64, error)

func (*Tx) CountRange

func (tx *Tx) CountRange(key Key, start, end uint64) (n uint64, err error)

CountRange returns the count of hot bits in the start, end range on the fragment. roaring.countRange counts the number of bits set between [start, end).

func (*Tx) GetFieldSizeBytes

func (tx *Tx) GetFieldSizeBytes(field uint64) (uint64, error)

func (*Tx) GetSortedFieldViewList

func (tx *Tx) GetSortedFieldViewList(idx *Index, shard uint64) (fvs []txkey.FieldView, err error)

func (*Tx) ImportRoaringBits

func (tx *Tx) ImportRoaringBits(key Key, rit roaring.RoaringIterator, clear bool, log bool, rowSize uint64) (changed int, rowSet map[uint64]int, err error)

func (*Tx) Max

func (tx *Tx) Max(key Key) (uint64, error)

func (*Tx) Min

func (tx *Tx) Min(key Key) (uint64, bool, error)

func (*Tx) OffsetRange

func (tx *Tx) OffsetRange(key Key, offset, start, end uint64) (*roaring.Bitmap, error)

func (*Tx) PutContainer

func (tx *Tx) PutContainer(key Key, containerKey uint64, c *roaring.Container) error

func (*Tx) Remove

func (tx *Tx) Remove(key Key, a ...uint64) (changeCount int, err error)

func (*Tx) RemoveContainer

func (tx *Tx) RemoveContainer(key Key, containerKey uint64) error

func (*Tx) Removed

func (tx *Tx) Removed(key Key, a ...uint64) (changed []uint64, err error)

Removed clears the specified bits and tells you which ones it actually removed.

func (*Tx) RoaringBitmap

func (tx *Tx) RoaringBitmap(key Key) (*roaring.Bitmap, error)

func (*Tx) Rollback

func (tx *Tx) Rollback()

func (*Tx) SnapshotReader

func (tx *Tx) SnapshotReader() (io.Reader, error)

SnapshotReader returns a reader that provides a snapshot of the current database.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址