api

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: Apache-2.0 Imports: 6 Imported by: 41

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntryHandler

type EntryHandler interface {
	Handle(labels model.LabelSet, time time.Time, entry string) error
}

EntryHandler is something that can "handle" entries.

type EntryHandlerFunc

type EntryHandlerFunc func(labels model.LabelSet, time time.Time, entry string) error

EntryHandlerFunc is modelled on http.HandlerFunc.

func (EntryHandlerFunc) Handle

func (e EntryHandlerFunc) Handle(labels model.LabelSet, time time.Time, entry string) error

Handle implements EntryHandler.

type EntryMiddleware

type EntryMiddleware interface {
	Wrap(next EntryHandler) EntryHandler
}

EntryMiddleware is something that takes on EntryHandler and produces another.

func AddLabelsMiddleware

func AddLabelsMiddleware(additionalLabels model.LabelSet) EntryMiddleware

AddLabelsMiddleware is an EntryMiddleware that adds some labels.

type EntryMiddlewareFunc

type EntryMiddlewareFunc func(next EntryHandler) EntryHandler

EntryMiddlewareFunc is modelled on http.HandlerFunc.

func (EntryMiddlewareFunc) Wrap

Wrap implements EntryMiddleware.

type EntryParser

type EntryParser int

EntryParser describes how to parse log lines.

const (
	Docker EntryParser = iota
	Raw
	CRI
)

Different supported EntryParsers.

func (*EntryParser) Set

func (e *EntryParser) Set(s string) error

Set implements flag.Value.

func (EntryParser) String

func (e EntryParser) String() string

String returns a string representation of the EntryParser.

func (*EntryParser) UnmarshalYAML

func (e *EntryParser) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements yaml.Unmarshaler.

func (EntryParser) Wrap

func (e EntryParser) Wrap(next EntryHandler) EntryHandler

Wrap implements EntryMiddleware.

Jump to

Keyboard shortcuts

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