counter

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CountOutput

type CountOutput struct {
	helper.OutputOperator
	// contains filtered or unexported fields
}

CountOutput is an output operator

func (*CountOutput) Process

func (co *CountOutput) Process(_ context.Context, _ *entry.Entry) error

Process increments the counter of the output operator

func (*CountOutput) Start

func (co *CountOutput) Start() error

Start begins messaging count output to either stdout or a file

func (*CountOutput) Stop

func (co *CountOutput) Stop() error

Stop tells the CountOutput to stop gracefully

type CountOutputConfig

type CountOutputConfig struct {
	helper.OutputConfig `yaml:",inline"`
	Path                string          `json:"path,omitempty" yaml:"path,omitempty"`
	Duration            helper.Duration `json:"duration,omitempty" yaml:"duration,omitempty"`
}

CountOutputConfig is the configuration of a count output operator.

func NewCounterOutputConfig

func NewCounterOutputConfig(operatorID string) *CountOutputConfig

NewCounterOutputConfig creates the default config for the count_output operator.

func (CountOutputConfig) Build

Build will build an instance of the count_output operator

Jump to

Keyboard shortcuts

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