ytstorage

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package ytstorage provides YTSaurus-based storage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Inserter

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

Inserter implements tracestorage.Inserter based on YTSaurus.

func NewInserter

func NewInserter(yc yt.Client, tables Tables) *Inserter

NewInserter creates new Inserter.

func (*Inserter) InsertLogLabels

func (i *Inserter) InsertLogLabels(ctx context.Context, labels map[logstorage.Label]struct{}) error

InsertLogLabels insert given set of labels to the storage.

func (*Inserter) InsertRecords

func (i *Inserter) InsertRecords(ctx context.Context, records []logstorage.Record) error

InsertRecords inserts given Records.

func (*Inserter) InsertSpans

func (i *Inserter) InsertSpans(ctx context.Context, spans []tracestorage.Span) error

InsertSpans inserts given spans.

func (*Inserter) InsertTags

func (i *Inserter) InsertTags(ctx context.Context, tags map[tracestorage.Tag]struct{}) error

InsertTags insert given set of tags to the storage.

type Tables

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

Tables define table paths.

func NewTables

func NewTables(prefix ypath.Path) Tables

NewTables creates new Tables with given path prefix.

func (*Tables) Migrate

func (s *Tables) Migrate(ctx context.Context, yc yt.Client, onConflict migrate.ConflictFn) error

Migrate setups YTSaurus tables for storage.

type YTQLQuerier

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

YTQLQuerier implements tracestorage.Querier based on YTSaurus QL.

func NewYTQLQuerier

func NewYTQLQuerier(yc yt.TabletClient, tables Tables) *YTQLQuerier

NewYTQLQuerier creates new YTQLQuerier.

func (*YTQLQuerier) LabelNames

func (q *YTQLQuerier) LabelNames(ctx context.Context, _ logstorage.LabelsOptions) ([]string, error)

LabelNames returns all available label names.

func (*YTQLQuerier) LabelValues

LabelValues returns all available label values for given label.

func (*YTQLQuerier) SearchTags

SearchTags performs search by given tags.

func (*YTQLQuerier) SelectLogs

SelectLogs makes a query for LogQL engine.

func (*YTQLQuerier) TagNames

func (q *YTQLQuerier) TagNames(ctx context.Context) ([]string, error)

TagNames returns all available tag names.

func (*YTQLQuerier) TagValues

func (q *YTQLQuerier) TagValues(ctx context.Context, tagName string) (iterators.Iterator[tracestorage.Tag], error)

TagValues returns all available tag values for given tag.

func (*YTQLQuerier) TraceByID

TraceByID returns spans of given trace.

func (*YTQLQuerier) Сapabilities

func (q *YTQLQuerier) Сapabilities() (caps logqlengine.QuerierСapabilities)

Сapabilities defines storage capabilities.

Jump to

Keyboard shortcuts

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