Documentation ¶
Index ¶
- type Checkpoints
- func (c *Checkpoints) Close()
- func (c *Checkpoints) Delete(shardID, targetVector string) error
- func (c *Checkpoints) DeleteShard(shardID string) error
- func (c *Checkpoints) Drop() error
- func (c *Checkpoints) Filename() string
- func (c *Checkpoints) Get(shardID, targetVector string) (count uint64, exists bool, err error)
- func (c *Checkpoints) Update(shardID, targetVector string, id uint64) error
- func (c *Checkpoints) UpdateIfNewer(shardID, targetVector string, id uint64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checkpoints ¶
type Checkpoints struct {
// contains filtered or unexported fields
}
Checkpoints keeps track of the last indexed vector id for each shard. It stores the ids in a BoltDB file.
func New ¶
func New(dir string, logger logrus.FieldLogger) (*Checkpoints, error)
func (*Checkpoints) Delete ¶
func (c *Checkpoints) Delete(shardID, targetVector string) error
func (*Checkpoints) DeleteShard ¶
func (c *Checkpoints) DeleteShard(shardID string) error
DeleteShard removes all checkpoints for a shard. It works for both single and multi vector shards.
func (*Checkpoints) Drop ¶
func (c *Checkpoints) Drop() error
func (*Checkpoints) Filename ¶
func (c *Checkpoints) Filename() string
func (*Checkpoints) Get ¶
func (c *Checkpoints) Get(shardID, targetVector string) (count uint64, exists bool, err error)
func (*Checkpoints) Update ¶
func (c *Checkpoints) Update(shardID, targetVector string, id uint64) error
func (*Checkpoints) UpdateIfNewer ¶
func (c *Checkpoints) UpdateIfNewer(shardID, targetVector string, id uint64) error
Click to show internal directories.
Click to hide internal directories.