vtstorage

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 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(ctx context.Context, tenantIDs []logstorage.TenantID, q *logstorage.Query) ([]logstorage.ValueWithHits, error)

GetFieldNames executes q and returns field names seen in results.

func GetFieldValues

func GetFieldValues(ctx context.Context, tenantIDs []logstorage.TenantID, q *logstorage.Query, fieldName string, limit uint64) ([]logstorage.ValueWithHits, error)

GetFieldValues executes q 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(ctx context.Context, tenantIDs []logstorage.TenantID, q *logstorage.Query) ([]logstorage.ValueWithHits, error)

GetStreamFieldNames executes q and returns stream field names seen in results.

func GetStreamFieldValues

func GetStreamFieldValues(ctx context.Context, tenantIDs []logstorage.TenantID, q *logstorage.Query, fieldName string, limit uint64) ([]logstorage.ValueWithHits, error)

GetStreamFieldValues executes q 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(ctx context.Context, tenantIDs []logstorage.TenantID, q *logstorage.Query, limit uint64) ([]logstorage.ValueWithHits, error)

GetStreamIDs executes q and returns streamIDs seen in query results.

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

func GetStreams

func GetStreams(ctx context.Context, tenantIDs []logstorage.TenantID, q *logstorage.Query, limit uint64) ([]logstorage.ValueWithHits, error)

GetStreams executes q 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(ctx context.Context, tenantIDs []logstorage.TenantID, q *logstorage.Query, writeBlock logstorage.WriteDataBlockFunc) error

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

func Stop

func Stop()

Stop stops vtstorage.

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