file

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NumberOfReceivedMsgs = prometheus.NewCounterVec(prometheus.CounterOpts{
	Name: "number_of_received_messages_total",
	Help: "Number of messages received by file output",
}, []string{"file_name"})
View Source
var NumberOfWrittenBytes = prometheus.NewCounterVec(prometheus.CounterOpts{
	Name: "number_of_written_bytes_total",
	Help: "Number of bytes written to file",
}, []string{"file_name"})
View Source
var NumberOfWrittenMsgs = prometheus.NewCounterVec(prometheus.CounterOpts{
	Name: "number_of_written_messages_total",
	Help: "Number of messages written to file",
}, []string{"file_name"})

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"`
}

Config //

type File

type File struct {
	Cfg *Config
	// 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, cfg map[string]interface{}, logger *log.Logger) error

Init //

func (*File) Metrics

func (f *File) Metrics() []prometheus.Collector

Metrics //

func (*File) String

func (f *File) String() string

func (*File) Write

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

Write //

Jump to

Keyboard shortcuts

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