tophost

package
v0.0.0-...-b3ece4c Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2019 License: GPL-3.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

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

Counter describes one counter for one cid tophost list for bytes / connections

func NewCounter

func NewCounter() *Counter

NewCounter initializes a new counter

type Input

type Input struct {
	Cid       uint32
	IPSrc     string
	IPDst     string
	Peer      string
	Direction string
	Packets   uint64
	Bytes     uint64
}

Input defines a set of input variables to be considered

type TophostExporter

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

TophostExporter handles top host counting and export

func (*TophostExporter) Consider

func (exporter *TophostExporter) Consider(input Input)

Consider adds new flow to tophost exporter

func (*TophostExporter) Initialize

func (tophostExporter *TophostExporter) Initialize(ex exporter.Exporter, maxHosts int, exportInterval time.Duration, hostMaxAge time.Duration)

Initialize the top host exporter

Jump to

Keyboard shortcuts

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