lokiexporter

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 10 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
	Labels          string
	BatchWait       time.Duration
	BatchEntriesNum int
}

func NewConfig

func NewConfig() *Config

type LogEntry

type LogEntry struct {
	Ts   time.Time `json:"ts"`
	Line string    `json:"line"`
}

https://github.com/afiskon/promtail-client/blob/master/promtail/common.go#L45

type LogMsg

type LogMsg struct {
	Streams []LogStream `json:"streams"`
}

type LogStream

type LogStream struct {
	Labels  string      `json:"labels"`
	Entries []*LogEntry `json:"entries"`
}

type LokiExporter

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

func NewLokiExporter

func NewLokiExporter(cfg interface{}) *LokiExporter

func (*LokiExporter) Consume

func (l *LokiExporter) Consume(data *model.DataBlock) error

func (*LokiExporter) Name

func (l *LokiExporter) Name() string

func (*LokiExporter) Run

func (l *LokiExporter) Run()

func (*LokiExporter) Send

func (l *LokiExporter) Send(entries []*LogEntry)

func (*LokiExporter) ShutDown

func (l *LokiExporter) ShutDown()

func (*LokiExporter) Write

func (l *LokiExporter) Write(content string)

Jump to

Keyboard shortcuts

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