file

package
v0.39.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	FileName           string          `mapstructure:"filename,omitempty"`
	FileType           string          `mapstructure:"file-type,omitempty"`
	Format             string          `mapstructure:"format,omitempty"`
	Multiline          bool            `mapstructure:"multiline,omitempty"`
	Indent             string          `mapstructure:"indent,omitempty"`
	Separator          string          `mapstructure:"separator,omitempty"`
	SplitEvents        bool            `mapstructure:"split-events,omitempty"`
	OverrideTimestamps bool            `mapstructure:"override-timestamps,omitempty"`
	AddTarget          string          `mapstructure:"add-target,omitempty"`
	TargetTemplate     string          `mapstructure:"target-template,omitempty"`
	EventProcessors    []string        `mapstructure:"event-processors,omitempty"`
	MsgTemplate        string          `mapstructure:"msg-template,omitempty"`
	ConcurrencyLimit   int             `mapstructure:"concurrency-limit,omitempty"`
	EnableMetrics      bool            `mapstructure:"enable-metrics,omitempty"`
	Debug              bool            `mapstructure:"debug,omitempty"`
	CalculateLatency   bool            `mapstructure:"calculate-latency,omitempty"`
	Rotation           *rotationConfig `mapstructure:"rotation,omitempty"`
}

Config //

type File

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

File //

func (*File) Close

func (f *File) Close() error

Close //

func (*File) Init

func (f *File) Init(ctx context.Context, name string, cfg map[string]interface{}, opts ...outputs.Option) error

Init //

func (*File) RegisterMetrics

func (f *File) RegisterMetrics(reg *prometheus.Registry)

Metrics //

func (*File) SetClusterName

func (f *File) SetClusterName(name string)

func (*File) SetEventProcessors

func (f *File) SetEventProcessors(ps map[string]map[string]interface{},
	logger *log.Logger,
	tcs map[string]*types.TargetConfig,
	acts map[string]map[string]interface{}) error

func (*File) SetLogger

func (f *File) SetLogger(logger *log.Logger)

func (*File) SetName

func (f *File) SetName(name string)

func (*File) SetTargetsConfig

func (f *File) SetTargetsConfig(map[string]*types.TargetConfig)

func (*File) String

func (f *File) String() string

func (*File) Write

func (f *File) Write(ctx context.Context, rsp proto.Message, meta outputs.Meta)

Write //

func (*File) WriteEvent

func (f *File) WriteEvent(ctx context.Context, ev *formatters.EventMsg)

Jump to

Keyboard shortcuts

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