vtstorage

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFieldNames

func GetFieldNames(qctx *logstorage.QueryContext) ([]logstorage.ValueWithHits, error)

GetFieldNames executes qctx and returns field names seen in results.

func GetFieldValues

func GetFieldValues(qctx *logstorage.QueryContext, fieldName string, limit uint64) ([]logstorage.ValueWithHits, error)

GetFieldValues executes the given qctx and returns unique values for the fieldName seen in results.

If limit > 0, then up to limit unique values are returned.

func GetStreamFieldNames

func GetStreamFieldNames(qctx *logstorage.QueryContext) ([]logstorage.ValueWithHits, error)

GetStreamFieldNames executes the given qctx and returns stream field names seen in results.

func GetStreamFieldValues

func GetStreamFieldValues(qctx *logstorage.QueryContext, fieldName string, limit uint64) ([]logstorage.ValueWithHits, error)

GetStreamFieldValues executes the given qctx and returns stream field values for the given fieldName seen in results.

If limit > 0, then up to limit unique stream field values are returned.

func GetStreamIDs

func GetStreamIDs(qctx *logstorage.QueryContext, limit uint64) ([]logstorage.ValueWithHits, error)

GetStreamIDs executes the given qctx and returns streamIDs seen in query results.

If limit > 0, then up to limit unique streamIDs are returned.

func GetStreams

func GetStreams(qctx *logstorage.QueryContext, limit uint64) ([]logstorage.ValueWithHits, error)

GetStreams executes the given qctx and returns streams seen in query results.

If limit > 0, then up to limit unique streams are returned.

func Init

func Init()

Init initializes vtstorage.

Stop must be called when vtstorage is no longer needed

func RequestHandler

func RequestHandler(w http.ResponseWriter, r *http.Request) bool

RequestHandler is a storage request handler.

func RunQuery

func RunQuery(qctx *logstorage.QueryContext, writeBlock logstorage.WriteDataBlockFunc) error

RunQuery runs the given qctx and calls writeBlock for the returned data blocks

func Stop

func Stop()

Stop stops vtstorage.

func UpdatePerQueryStatsMetrics added in v0.3.0

func UpdatePerQueryStatsMetrics(qs *logstorage.QueryStats)

UpdatePerQueryStatsMetrics updates query stats metrics with the given qs.

Types

type Storage

type Storage struct{}

Storage implements insertutil.LogRowsStorage interface

func (*Storage) CanWriteData

func (*Storage) CanWriteData() error

CanWriteData returns non-nil error if it cannot write data to vtstorage

func (*Storage) MustAddRows

func (*Storage) MustAddRows(lr *logstorage.LogRows)

MustAddRows adds lr to vtstorage

It is advised to call CanWriteData() before calling MustAddRows()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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