netflowstate

package
v0.0.0-...-3464a1d Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package netflowstate provides a Netflow state manager on top of goflow default producer, to allow additional fields collection.

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyStarted = errors.New("the routine is already started")

ErrAlreadyStarted error happens when you try to start twice a flow routine

Functions

This section is empty.

Types

type StateNetFlow

type StateNetFlow struct {
	Format    format.FormatInterface
	Transport transport.TransportInterface
	Logger    utils.Logger

	Config *producer.ProducerConfig

	TemplateSystem templates.TemplateInterface
	// contains filtered or unexported fields
}

StateNetFlow holds a NetflowV9/IPFIX producer

func NewStateNetFlow

func NewStateNetFlow(mappingConfs []config.Mapping) *StateNetFlow

NewStateNetFlow initializes a new Netflow/IPFIX producer, with the goflow default producer and the additional fields producer

func (*StateNetFlow) DecodeFlow

func (s *StateNetFlow) DecodeFlow(msg interface{}) error

DecodeFlow decodes a flow into common.FlowMessageWithAdditionalFields

func (*StateNetFlow) FlowRoutine

func (s *StateNetFlow) FlowRoutine(workers int, addr string, port int, reuseport bool) error

FlowRoutine starts a goflow flow routine

func (*StateNetFlow) Shutdown

func (s *StateNetFlow) Shutdown()

Jump to

Keyboard shortcuts

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