lokikit

package
v0.0.0-...-e37d8fb Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const LOG_ENTRIES_CHAN_SIZE = 5000

Variables

This section is empty.

Functions

This section is empty.

Types

type LokiWriter

type LokiWriter struct {
	io.Writer
	// contains filtered or unexported fields
}

LokiWriter send log messages towards Loki.

func NewLokiWriter

func NewLokiWriter(
	rootUrl string, timeOffset int64, opts ...LokiWriterOption,
) (*LokiWriter, error)

func (*LokiWriter) Shutdown

func (h *LokiWriter) Shutdown()

func (*LokiWriter) Write

func (h *LokiWriter) Write(p []byte) (n int, err error)

type LokiWriterOption

type LokiWriterOption func(h *LokiWriter)

func WithBasicAuth

func WithBasicAuth(username, password string) LokiWriterOption

func WithFields

func WithFields(fields []string) LokiWriterOption

func WithLabels

func WithLabels(kv map[string]string) LokiWriterOption

Jump to

Keyboard shortcuts

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