victorialogs

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Overview

Package victorialogs implements providers.LogsProvider against VictoriaLogs, querying with LogsQL and normalizing the NDJSON response into log lines.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client queries a VictoriaLogs backend.

func New

func New(baseURL string) *Client

New builds a client for a VictoriaLogs base URL, unauthenticated.

func NewWithAuth added in v0.3.0

func NewWithAuth(baseURL, tokenEnv string, headers map[string]string) *Client

NewWithAuth builds a client that adds optional auth to every request. tokenEnv names an env var holding a bearer token (empty, or pointing at an unset/empty var, ⇒ no Authorization header); headers are static request headers (e.g. "X-Scope-OrgID" for a multi-tenant backend). The token is read from the environment at request-build time and is never logged.

func (*Client) Query

Query runs a LogsQL query over the window and returns normalized log lines.

It pages with limit+offset up to maxLines so a high-volume window is not silently capped at a single page; when the cap binds (the page that reaches it was full, implying more matched), a sentinel line signals the partial view.

Offset pagination orders by the largest _time values; concurrent ingestion into the queried range could shift the page boundary, but incidents query a settled past window, so this is acceptable for v1.

Jump to

Keyboard shortcuts

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