loki

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LokiClient

type LokiClient struct {
	URL    string
	Client *http.Client
}

LokiClient handles sending log messages to Loki.

func InitializeLokiClient

func InitializeLokiClient(url string) *LokiClient

func NewLokiClient

func NewLokiClient(url string) *LokiClient

NewLokiClient creates a new instance of LokiClient.

func (*LokiClient) SendLog

func (c *LokiClient) SendLog(level, message string) error

type LokiLogEntry

type LokiLogEntry struct {
	Ts   string `json:"ts"`
	Line string `json:"line"`
}

type LokiPayload

type LokiPayload struct {
	Streams []LokiStream `json:"streams"`
}

type LokiStream

type LokiStream struct {
	Stream map[string]string `json:"stream"`
	Values [][]string        `json:"values"`
}

Jump to

Keyboard shortcuts

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