Documentation ¶
Index ¶
- type DBSet
- func (d *DBSet) Add(k rangesync.KeyBytes) error
- func (d *DBSet) Advance() error
- func (d *DBSet) Empty() (bool, error)
- func (d *DBSet) EnsureLoaded() error
- func (d *DBSet) GetRangeInfo(x, y rangesync.KeyBytes) (rangesync.RangeInfo, error)
- func (d *DBSet) Has(k rangesync.KeyBytes) (bool, error)
- func (d *DBSet) Items() rangesync.SeqResult
- func (d *DBSet) Loaded() bool
- func (d *DBSet) Receive(k rangesync.KeyBytes) error
- func (d *DBSet) Received() rangesync.SeqResult
- func (d *DBSet) Recent(since time.Time) (rangesync.SeqResult, int)
- func (d *DBSet) SplitRange(x, y rangesync.KeyBytes, count int) (rangesync.SplitInfo, error)
- func (d *DBSet) WithCopy(ctx context.Context, toCall func(rangesync.OrderedSet) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBSet ¶
type DBSet struct {
// contains filtered or unexported fields
}
DBSet is an implementation of rangesync.OrderedSet that uses an SQL database as its backing store. It uses an FPTree to perform efficient range queries.
func (*DBSet) Advance ¶
Advance advances the DBSet to the latest state of the underlying database table.
func (*DBSet) EnsureLoaded ¶
EnsureLoaded ensures that the DBSet is loaded and ready to be used. Implements rangesync.OrderedSet.
func (*DBSet) GetRangeInfo ¶
GetRangeInfo returns information about the range of items in the DBSet. Implements rangesync.OrderedSet.
func (*DBSet) Has ¶
Has returns true if the DBSet contains the given item. Implements rangesync.OrderedSet.
func (*DBSet) Items ¶
Items returns a sequence of all items in the DBSet. Implements rangesync.OrderedSet.
func (*DBSet) Loaded ¶ added in v1.7.9
Loaded returns true if the DBSet is loaded. Implements rangesync.OrderedSet.
func (*DBSet) Receive ¶
Receive handles a newly received item, arranging for it to be returned as part of the sequence returned by Received. Implements rangesync.OrderedSet.
func (*DBSet) Received ¶
Received returns a sequence of all items that have been received. Implements rangesync.OrderedSet.
func (*DBSet) Recent ¶
Recent returns a sequence of items that have been added to the DBSet since the given time. Implements rangesync.OrderedSet.
func (*DBSet) SplitRange ¶
SplitRange splits the range of items in the DBSet into two parts, returning information about eachn part and the middle item. Implements rangesync.OrderedSet.