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 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.
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 ¶ added in v0.35.0
func NewLogsReceiver() LogsReceiver
func NewLogsReceiverWithChannel ¶ added in v0.35.0
func NewLogsReceiverWithChannel(c chan Entry) LogsReceiver