vmlogs

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	BaseURL  string
	User     string
	Password string
	Client   *http.Client
}

Client represents a Victoria Logs client for streaming logs

func NewClient

func NewClient(baseURL, user, password string) *Client

NewClient creates a new Victoria Logs client

func (*Client) Tail

func (c *Client) Tail(ctx context.Context, logsQL string, params map[string]string, onLine func(string) error) error

Tail live-tails logs matching LogsQL. Optionally pass params like start_offset=1h to replay recent history before live mode kicks in.

type Receiver

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

Receiver implements a Victoria Logs receiver that streams logs to a channel

func NewReceiver

func NewReceiver(baseURL, user, password, query string, params map[string]string) *Receiver

NewReceiver creates a new Victoria Logs receiver

func (*Receiver) GetLineChan

func (r *Receiver) GetLineChan() <-chan string

GetLineChan returns the channel for receiving log lines

func (*Receiver) Start

func (r *Receiver) Start() error

Start begins streaming logs from Victoria Logs

func (*Receiver) Stop

func (r *Receiver) Stop()

Stop stops the Victoria Logs receiver

Jump to

Keyboard shortcuts

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