vlclient

package
v1.6.5-rc4 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	URL     string
	Prefix  string
	Query   string
	Headers map[string]string

	Username string
	Password string

	Since time.Duration

	FailMaxDuration time.Duration

	Limit int
}

type Log

type Log struct {
	Message string    `json:"_msg"`
	Time    time.Time `json:"_time"`
}

Log represents a VictoriaLogs log line See: https://docs.victoriametrics.com/victorialogs/querying/#querying-logs

type VLClient

type VLClient struct {
	Logger *log.Entry
	// contains filtered or unexported fields
}

func NewVLClient

func NewVLClient(config Config) *VLClient

func (*VLClient) Get

func (lc *VLClient) Get(ctx context.Context, url string) (*http.Response, error)

func (*VLClient) QueryRange

func (lc *VLClient) QueryRange(ctx context.Context, infinite bool) chan *Log

QueryRange queries the logs See: https://docs.victoriametrics.com/victorialogs/querying/#querying-logs

func (*VLClient) Ready

func (lc *VLClient) Ready(ctx context.Context) error

func (*VLClient) SetTomb

func (lc *VLClient) SetTomb(t *tomb.Tomb)

func (*VLClient) Tail

func (lc *VLClient) Tail(ctx context.Context) (chan *Log, error)

Tail live-tailing for logs See: https://docs.victoriametrics.com/victorialogs/querying/#live-tailing

Jump to

Keyboard shortcuts

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