netflow

package
v0.0.0-...-efaec8f Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesFormat

func BytesFormat(v int64) string

Types

type Netflow

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

func (*Netflow) AddConn

func (nf *Netflow) AddConn(n int32)

func (*Netflow) ConnTotal

func (nf *Netflow) ConnTotal() (n int32)

func (*Netflow) DelConn

func (nf *Netflow) DelConn(n int32)

func (*Netflow) ReadTotal

func (nf *Netflow) ReadTotal() (n int64)

func (*Netflow) Report

func (nf *Netflow) Report(r, w int)

func (*Netflow) Start

func (nf *Netflow) Start(sec int, fnlog func(i NetflowInfo))

func (*Netflow) Stop

func (nf *Netflow) Stop()

func (*Netflow) WrittenTotal

func (nf *Netflow) WrittenTotal() (n int64)

type NetflowConn

type NetflowConn struct {
	net.Conn
	Netflow *Netflow
}

func (*NetflowConn) Read

func (c *NetflowConn) Read(b []byte) (n int, err error)

func (*NetflowConn) Write

func (c *NetflowConn) Write(b []byte) (n int, err error)

type NetflowInfo

type NetflowInfo struct {
	ConnTotal    int32
	ReadTotal    int64
	WrittenTotal int64
	ReadSpeed    int64
	WrittenSpeed int64
}

Jump to

Keyboard shortcuts

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