partition

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMalformedElement = errors.New("element is malformed")

Functions

func GetTagByOffset

func GetTagByOffset(value []*modelv1.TagFamilyForWrite, fIndex, tIndex int) (*modelv1.TagValue, error)

func ShardID

func ShardID(key []byte, shardNum uint32) (uint, error)

Types

type EntityLocator

type EntityLocator []TagLocator

func NewEntityLocator

func NewEntityLocator(families []*databasev1.TagFamilySpec, entity *databasev1.Entity) EntityLocator

func (EntityLocator) Find

func (e EntityLocator) Find(subject string, value []*modelv1.TagFamilyForWrite) (tsdb.Entity, error)

func (EntityLocator) Locate

func (e EntityLocator) Locate(subject string, value []*modelv1.TagFamilyForWrite, shardNum uint32) (tsdb.Entity, common.ShardID, error)

type IndexRuleLocator

type IndexRuleLocator struct {
	Rule       *databasev1.IndexRule
	TagIndices []TagLocator
}

func ParseIndexRuleLocators

func ParseIndexRuleLocators(families []*databasev1.TagFamilySpec, indexRules []*databasev1.IndexRule) (locators []*IndexRuleLocator)

type TagLocator

type TagLocator struct {
	FamilyOffset int
	TagOffset    int
}

Jump to

Keyboard shortcuts

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