runner

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package runner provides the glue to link a generator to an output and to execute.

Configuration.

"generator" and "output" are required, and are the configs of the
specific types.

"records" is optional, default is 1024.  This is the number of log
records to write per interval.

"interval" is optional and is a go duration.  If no interval is
given then the runner is executed once.  If an interval is given
then at each interval the runner is executed.

Example:

  generator:
    type: "aws:vpcflow"
  output:
    type: file
    directory: "/var/tmp"
    pattern: "spigot_asa_*.log"
    delimiter: "\n"
  interval: 5s
  records: 2

This would write 2 vpcflow log entries to a file in the
/var/tmp/spigot_asa_<random>.log file every 5 seconds.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

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

Runner holds the config, output and generator.

func New

func New(cfg *ucfg.Config) (Runner, error)

New is Factory for creating a new runner

func (*Runner) Execute

func (r *Runner) Execute() error

Execute runs the runner

Jump to

Keyboard shortcuts

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