goflow

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(message *flowmessage.FlowMessage) (map[string]interface{}, time.Time, error)

Parse parses a netflow message into an entry. It is assumed that Proto, InIf, and OutIf are always set because 0 values are valid.

Types

type GoflowInput

type GoflowInput struct {
	helper.InputOperator
	// contains filtered or unexported fields
}

GoflowInput is an operator that receives network traffic information from network devices.

func (*GoflowInput) Printf

func (n *GoflowInput) Printf(format string, args ...interface{})

Printf is required by goflows logging interface

func (*GoflowInput) Publish

func (n *GoflowInput) Publish(messages []*flowmessage.FlowMessage)

Publish writes entries and satisfies GoFlow's util.Transport interface

func (*GoflowInput) Start

func (n *GoflowInput) Start() error

Start will start generating log entries.

func (*GoflowInput) Stop

func (n *GoflowInput) Stop() error

Stop will stop generating logs.

type GoflowInputConfig

type GoflowInputConfig struct {
	helper.InputConfig `yaml:",inline"`

	Mode          string `json:"mode,omitempty"           yaml:"mode,omitempty"`
	ListenAddress string `json:"listen_address,omitempty" yaml:"listen_address,omitempty"`
	Workers       uint   `json:"workers,omitempty"        yaml:"workers,omitempty"`
}

GoflowInputConfig is the configuration of a goflow input operator.

func NewGoflowInputConfig

func NewGoflowInputConfig(operatorID string) *GoflowInputConfig

NewGoflowInputConfig creates a new goflow input config with default values

func (*GoflowInputConfig) Build

Build will build a goflow input operator.

Jump to

Keyboard shortcuts

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