api

package
v2.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: AGPL-3.0 Imports: 4 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.

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 shutdown the EntryHandler

func NewEntryHandler

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

NewEntryHandler creates a new EntryHandler using a 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 from 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

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)
}

Jump to

Keyboard shortcuts

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