Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 ¶
func (e EntryMiddlewareFunc) Wrap(next EntryHandler) EntryHandler
Wrap uses an EntryMiddlewareFunc to wrap around an EntryHandler and return a new one that applies that func.
type EntryMutatorFunc ¶
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