Documentation ¶
Index ¶
- Variables
- type Config
- type File
- func (f *File) Close() error
- func (f *File) Init(ctx context.Context, name string, cfg map[string]interface{}, ...) error
- func (f *File) RegisterMetrics(reg *prometheus.Registry)
- func (f *File) SetClusterName(name string)
- func (f *File) SetEventProcessors(ps map[string]map[string]interface{}, logger *log.Logger, ...)
- func (f *File) SetLogger(logger *log.Logger)
- func (f *File) SetName(name string)
- func (f *File) String() string
- func (f *File) Write(ctx context.Context, rsp proto.Message, meta outputs.Meta)
- func (f *File) WriteEvent(ctx context.Context, ev *formatters.EventMsg)
Constants ¶
This section is empty.
Variables ¶
View Source
var NumberOfFailWriteMsgs = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: "gnmic", Subsystem: "file_output", Name: "number_messages_writes_fail_total", Help: "Number of failed message writes to file output", }, []string{"file_name", "reason"})
View Source
var NumberOfReceivedMsgs = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: "gnmic", Subsystem: "file_output", Name: "number_messages_received_total", Help: "Number of messages received by file output", }, []string{"file_name"})
View Source
var NumberOfWrittenBytes = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: "gnmic", Subsystem: "file_output", Name: "number_bytes_written_total", Help: "Number of bytes written to file output", }, []string{"file_name"})
View Source
var NumberOfWrittenMsgs = prometheus.NewCounterVec(prometheus.CounterOpts{ Namespace: "gnmic", Subsystem: "file_output", Name: "number_messages_writes_total", Help: "Number of messages written to file output", }, []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"` EventProcessors []string `mapstructure:"event-processors,omitempty"` ConcurrencyLimit int `mapstructure:"concurrency-limit,omitempty"` EnableMetrics bool `mapstructure:"enable-metrics,omitempty"` Debug bool `mapstructure:"debug,omitempty"` }
Config //
type File ¶
type File struct { Cfg *Config // contains filtered or unexported fields }
File //
func (*File) Init ¶
func (f *File) Init(ctx context.Context, name string, cfg map[string]interface{}, opts ...outputs.Option) error
Init //
func (*File) RegisterMetrics ¶ added in v0.7.0
func (f *File) RegisterMetrics(reg *prometheus.Registry)
Metrics //
func (*File) SetClusterName ¶ added in v0.8.0
func (*File) SetEventProcessors ¶ added in v0.6.0
func (*File) WriteEvent ¶ added in v0.7.0
func (f *File) WriteEvent(ctx context.Context, ev *formatters.EventMsg)
Click to show internal directories.
Click to hide internal directories.