output

package
v0.0.0-...-d52619c Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: LGPL-2.1 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Outputs map[string]OutputFactory

Functions

func FileOutputFactory

func FileOutputFactory(rawCfg map[string]interface{}) (api.Output, error)

func FluentOutputFactory

func FluentOutputFactory(rawCfg map[string]interface{}) (api.Output, error)

func LokiOutputFactory

func LokiOutputFactory(cfg map[string]interface{}) (api.Output, error)

func PrometheusFactory

func PrometheusFactory(rawCfg map[string]interface{}) (api.Output, error)

func StdoutOutputFactory

func StdoutOutputFactory(cfg map[string]interface{}) (api.Output, error)

Types

type File

type File struct {
	// contains filtered or unexported fields
}

File writes logs to file

func NewFile

func NewFile(pathPattern string) (*File, error)

NewFile returns new File, with a path pattern

func (*File) Close

func (f *File) Close() error

func (*File) Write

func (f *File) Write(ctx context.Context, ts time.Time, line string, meta map[string]interface{}) error

type FileOutputConfig

type FileOutputConfig struct {
	PathPattern string `mapstructure:"path_pattern"`
}

type FluentOutput

type FluentOutput struct {
	// contains filtered or unexported fields
}

func (*FluentOutput) Close

func (f *FluentOutput) Close() error

func (*FluentOutput) Write

func (f *FluentOutput) Write(ctx context.Context, ts time.Time, line string, meta map[string]interface{}) error

type FluentOutputConfig

type FluentOutputConfig struct {
	Labels   []string
	Tag      string
	Timezone string
	Config   *fluent.Config
}

type LogMarshaler

type LogMarshaler struct {
	// contains filtered or unexported fields
}

func (*LogMarshaler) MarshalMsg

func (l *LogMarshaler) MarshalMsg(out []byte) ([]byte, error)

type LokiOutput

type LokiOutput struct {
	// contains filtered or unexported fields
}

func (*LokiOutput) Close

func (l *LokiOutput) Close() error

func (*LokiOutput) Write

func (l *LokiOutput) Write(ctx context.Context, ts time.Time, line string, meta map[string]interface{}) error

type OutputFactory

type OutputFactory func(map[string]interface{}) (api.Output, error)

type PrometheusConfig

type PrometheusConfig struct {
	Salt  string
	Addr  string
	Label string
}

type PrometheusOutput

type PrometheusOutput struct {
	// contains filtered or unexported fields
}

func (*PrometheusOutput) Close

func (p *PrometheusOutput) Close() error

func (*PrometheusOutput) ServeHTTP

func (p *PrometheusOutput) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*PrometheusOutput) Write

func (p *PrometheusOutput) Write(ctx context.Context, ts time.Time, line string, meta map[string]interface{}) error

type StdoutOutput

type StdoutOutput struct {
}

func (*StdoutOutput) Close

func (s *StdoutOutput) Close() error

func (*StdoutOutput) Write

func (s *StdoutOutput) Write(ctx context.Context, ts time.Time, line string, meta map[string]interface{}) error

type TraefikProm

type TraefikProm struct {
	// contains filtered or unexported fields
}

func NewTraefikProm

func NewTraefikProm(project, key []byte) *TraefikProm

Jump to

Keyboard shortcuts

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