loki

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Labels model.LabelSet
	logproto.Entry
}

Entry is a log entry with labels.

func (*Entry) Clone

func (e *Entry) Clone() Entry

Clone returns a copy of the entry so that it can be safely fanned out.

type EntryHandler

type EntryHandler interface {
	Chan() chan<- Entry
	Stop()
}

EntryHandler is something that can "handle" entries via a channel. Stop must be called to gracefully shut down the EntryHandler

func NewEntryHandler

func NewEntryHandler(entries chan<- Entry, stop func()) EntryHandler

NewEntryHandler creates a new EntryHandler using an input channel and a stop function.

func NewEntryMutatorHandler

func NewEntryMutatorHandler(next EntryHandler, f EntryMutatorFunc) EntryHandler

NewEntryMutatorHandler creates a EntryHandler that mutates incoming entries from another EntryHandler.

type EntryMiddleware

type EntryMiddleware interface {
	Wrap(EntryHandler) EntryHandler
}

EntryMiddleware takes an EntryHandler and returns another one that will intercept and forward entries. The newly created EntryHandler should be Stopped independently of the original one.

func AddLabelsMiddleware

func AddLabelsMiddleware(additionalLabels model.LabelSet) EntryMiddleware

AddLabelsMiddleware is an EntryMiddleware that adds some labels.

type EntryMiddlewareFunc

type EntryMiddlewareFunc func(EntryHandler) EntryHandler

EntryMiddlewareFunc allows to create EntryMiddleware via a function.

func (EntryMiddlewareFunc) Wrap

Wrap uses an EntryMiddlewareFunc to wrap around an EntryHandler and return a new one that applies that func.

type EntryMutatorFunc

type EntryMutatorFunc func(Entry) Entry

EntryMutatorFunc is a function that can mutate an entry

type InstrumentedEntryHandler

type InstrumentedEntryHandler interface {
	EntryHandler
	UnregisterLatencyMetric(prometheus.Labels)
}

InstrumentedEntryHandler ...

type LogsReceiver

type LogsReceiver interface {
	Chan() chan Entry
}

LogsReceiver is an interface providing `chan Entry` which is used for component communication.

func NewLogsReceiver

func NewLogsReceiver() LogsReceiver

func NewLogsReceiverWithChannel

func NewLogsReceiverWithChannel(c chan Entry) LogsReceiver

Directories

Path Synopsis
wal

Jump to

Keyboard shortcuts

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