outputreport

package
v0.0.0-...-c13075e Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 6 Imported by: 3

README

gogstash output report

Synopsis

{
	"output": [
		{
			"type": "report",

			// (optional), in seconds, default: 5
			"interval": 5,

			// (optional), default: "[2/Jan/2006:15:04:05 -0700]"
			"time_format": "[2/Jan/2006:15:04:05 -0700]"
		}
	]
}

Details

  • type
    • Must be "report"
  • interval
    • Interval for reporting event process count
  • time_format

Documentation

Index

Constants

View Source
const ModuleName = "report"

ModuleName is the name used in config file

Variables

This section is empty.

Functions

func InitHandler

func InitHandler(
	ctx context.Context,
	raw config.ConfigRaw,
	control config.Control,
) (config.TypeOutputConfig, error)

InitHandler initialize the output plugin

Types

type OutputConfig

type OutputConfig struct {
	config.OutputConfig
	Interval     int    `json:"interval,omitempty"`
	TimeFormat   string `json:"time_format,omitempty"`
	ReportPrefix string `json:"report_prefix,omitempty"`

	ProcessCount int64 `json:"-"`
}

OutputConfig holds the configuration json fields and internal objects

func DefaultOutputConfig

func DefaultOutputConfig() OutputConfig

DefaultOutputConfig returns an OutputConfig struct with default values

func (*OutputConfig) Output

func (t *OutputConfig) Output(ctx context.Context, event logevent.LogEvent) (err error)

Output event

Jump to

Keyboard shortcuts

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