loop

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	START messageType = iota
	DATA
	END
)

Variables

This section is empty.

Functions

func WriteAllSamples

func WriteAllSamples()

Types

type DataSet

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

func NewDataSet

func NewDataSet(sz int64) (*DataSet, error)

type Metrics

type Metrics struct {
	Addr   net.Addr
	Peer   net.Addr
	Prefix string

	RxBytes      []*util.Sample
	RxBytesAccum int64
	TxBytes      []*util.Sample
	TxBytesAccum int64
	// contains filtered or unexported fields
}

func NewMetrics

func NewMetrics(addr, peer net.Addr, ms int, prefix string) (*Metrics, error)

func (*Metrics) Close

func (self *Metrics) Close()

func (*Metrics) Rx

func (self *Metrics) Rx(bytes int64)

func (*Metrics) Start

func (self *Metrics) Start()

func (*Metrics) Summarize

func (self *Metrics) Summarize()

func (*Metrics) Tx

func (self *Metrics) Tx(bytes int64)

type Pool

type Pool struct {
	Allocations int32
	// contains filtered or unexported fields
}

func NewPool

func NewPool(sz int64) *Pool

type Receiver

type Receiver struct {
	Done chan struct{}
	// contains filtered or unexported fields
}

func NewReceiver

func NewReceiver(metrics *Metrics, conn net.Conn) *Receiver

func (*Receiver) Run

func (self *Receiver) Run(hasher bool)

type Sender

type Sender struct {
	Done chan struct{}
	// contains filtered or unexported fields
}

func NewSender

func NewSender(ds *DataSet, metrics *Metrics, conn net.Conn, ct int) *Sender

func (*Sender) Run

func (self *Sender) Run()

Jump to

Keyboard shortcuts

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