vtstorage

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteActiveTasks added in v0.5.1

func DeleteActiveTasks(ctx context.Context) ([]*logstorage.DeleteTask, error)

DeleteActiveTasks returns a list of active deletion tasks started via DeleteRunTask().

func DeleteRunTask added in v0.5.1

func DeleteRunTask(ctx context.Context, taskID string, timestamp int64, tenantIDs []logstorage.TenantID, f *logstorage.Filter) error

DeleteRunTask starts deletion of logs for the given filter f for the given tenantIDs.

The taskID and timestamp are tracked in the list of tasks returned by DeleteActiveTasks().

func DeleteStopTask added in v0.5.1

func DeleteStopTask(ctx context.Context, taskID string) error

DeleteStopTask stops delete task with the given taskID.

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 GetTenantIDs added in v0.5.1

func GetTenantIDs(ctx context.Context, start, end int64) ([]logstorage.TenantID, error)

GetTenantIDs returns tenantIDs from the storage by the given start and end.

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) IsLocalStorage added in v0.7.0

func (*Storage) IsLocalStorage() bool

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