lib

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: May 2, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package lib provides ...

Index

Constants

View Source
const (
	Dir  = 0 // Direction
	Time = 1 // Timestamp
	Rate = 2 // Rate
)

CSV fields

Variables

This section is empty.

Functions

func BuildClient

func BuildClient(app *Config) (bool, int64, int64)

BuildClient for another lib to use

func BuildServer

func BuildServer(app *Config)

BuildServer for public func

Types

type ChartData

type ChartData struct {
	XValues []time.Time
	YValues []float64
}

ChartData records data for chart

type Config

type Config struct {
	Hosts          hostList
	Listeners      hostList
	DefaultPort    string
	ReportInterval string
	TotalDuration  string
	Chart          string
	Export         string
	Csv            string
	TLSCert        string
	TLSKey         string
	LocalAddr      string
	Opt            Options
	ASCII          bool // plot ascii chart
	TLS            bool
	PassiveClient  bool // suppress client send
	UDP            bool
	Connections    int
}

Config for client or server use.

type ExportInfo

type ExportInfo struct {
	Input  ChartData
	Output ChartData
}

ExportInfo records data for export

type Options added in v0.7.1

type Options struct {
	ReportInterval time.Duration
	TotalDuration  time.Duration
	TCPReadSize    int
	TCPWriteSize   int
	UDPReadSize    int
	UDPWriteSize   int
	PassiveServer  bool              // suppress server send
	MaxSpeed       float64           // mbps
	Table          map[string]string // send optional information client->server
}

Options msg.

Jump to

Keyboard shortcuts

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