metadata

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LabelPairs

func LabelPairs(ls []int32) iter.Iterator[[]int32]

func Sanitize

func Sanitize(md *metastorev1.BlockMeta) error

func Tenant

func Tenant(md *metastorev1.BlockMeta) string

func Timestamp

func Timestamp(md *metastorev1.BlockMeta) time.Time

Types

type LabelBuilder

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

func NewLabelBuilder

func NewLabelBuilder(strings *StringTable) *LabelBuilder

func (*LabelBuilder) Build

func (lb *LabelBuilder) Build() []int32

func (*LabelBuilder) CreateLabels

func (lb *LabelBuilder) CreateLabels(values ...string) bool

func (*LabelBuilder) Put

func (lb *LabelBuilder) Put(x []int32, strings []string)

func (*LabelBuilder) WithConstantPairs

func (lb *LabelBuilder) WithConstantPairs(pairs ...string) *LabelBuilder

func (*LabelBuilder) WithLabelNames

func (lb *LabelBuilder) WithLabelNames(names ...string) *LabelBuilder

type LabelMatcher

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

func NewLabelMatcher

func NewLabelMatcher(strings *StringTable, matchers []*labels.Matcher, keep ...string) *LabelMatcher

func (*LabelMatcher) IsValid

func (lm *LabelMatcher) IsValid() bool

func (*LabelMatcher) Matched

func (lm *LabelMatcher) Matched() []model.Labels

func (*LabelMatcher) Matches

func (lm *LabelMatcher) Matches(pairs []int32) bool

type StringTable

type StringTable struct {
	Dict    map[string]int32
	Strings []string
}

func NewStringTable

func NewStringTable() *StringTable

func (*StringTable) Export

func (t *StringTable) Export(dst *metastorev1.BlockMeta)

func (*StringTable) Import

func (t *StringTable) Import(src *metastorev1.BlockMeta)

Import strings from the metadata entry and update the references.

func (*StringTable) IsEmpty

func (t *StringTable) IsEmpty() bool

func (*StringTable) Load

func (t *StringTable) Load(x iter.Iterator[string]) error

func (*StringTable) Lookup

func (t *StringTable) Lookup(i int32) string

func (*StringTable) LookupString

func (t *StringTable) LookupString(s string) int32

func (*StringTable) Put

func (t *StringTable) Put(s string) int32

func (*StringTable) Reset

func (t *StringTable) Reset()

Jump to

Keyboard shortcuts

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