hindex

package
v0.0.0-...-7f3ab3a Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OID

type OID = hcorpus.ID

type Operator

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

func New

func New() *Operator

func (*Operator) AddTags

func (o *Operator) AddTags(ctx context.Context, s cadata.Store, root Root, fp OID, tags []labels.Pair) (*Root, error)

func (*Operator) ForEach

func (o *Operator) ForEach(ctx context.Context, s cadata.Store, root Root, fn func(OID, []labels.Pair) error) error

func (*Operator) ForEachKey

func (o *Operator) ForEachKey(ctx context.Context, s cadata.Store, root Root, fn func(string) error) error

func (*Operator) ForEachValue

func (o *Operator) ForEachValue(ctx context.Context, s cadata.Store, root Root, tagKey string, fn func([]byte) error) error

func (*Operator) GetTagValue

func (o *Operator) GetTagValue(ctx context.Context, s cadata.Store, root Root, fp OID, tagKey string) ([]byte, error)

func (*Operator) GetTags

func (o *Operator) GetTags(ctx context.Context, s cadata.Store, root Root, oid OID) (ret []labels.Pair, _ error)

func (*Operator) NewEmpty

func (o *Operator) NewEmpty(ctx context.Context, s cadata.Store) (*Root, error)

func (*Operator) NewQueryBackend

func (o *Operator) NewQueryBackend(s cadata.Store, root Root) QueryBackend

func (*Operator) Search

func (o *Operator) Search(ctx context.Context, s cadata.Store, root Root, query labels.Query) (*labels.ResultSet, error)

type QueryBackend

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

func (QueryBackend) GetValue

func (qb QueryBackend) GetValue(ctx context.Context, id OID, key string) ([]byte, error)

func (QueryBackend) ScanForward

func (qb QueryBackend) ScanForward(ctx context.Context, span labels.Span, fn labels.IterFunc) error

func (QueryBackend) ScanInverted

func (qb QueryBackend) ScanInverted(ctx context.Context, tagKey string, fn labels.IterFunc) error

type Root

type Root = gotkv.Root

Root is the root of an index The index is structured like this:

f/

<tag_key>/
	<entity> -> <tag_value>
	<entity> -> <tag_value>
	...
<tag_key2>/
	...

i/

<tag_key>/
	<tag_value><entity> -> ""
	<tag_value><entity> -> ""
	...
<tag_key2>/
	...

Jump to

Keyboard shortcuts

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