load

package
v0.0.0-...-c8b15d8 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2018 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const (
	PacketSize = 105 // Reported by tcpdump, size of LoadPacket with empty Payload. Varies between 105-107.
)

Variables

View Source
var (
	Protocol     *loadProtocol
	MiniProtocol = protocols.NewMiniProtocolTransport(Protocol, protocols.UdpTransportB(2048))
)

Functions

This section is empty.

Types

type Client

type Client struct {
	protocols.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

func (*Client) Close

func (client *Client) Close() error

func (*Client) Pause

func (client *Client) Pause()

func (*Client) Resume

func (client *Client) Resume()

func (*Client) SendLoad

func (client *Client) SendLoad() error

func (*Client) SetPayload

func (client *Client) SetPayload(size uint)

func (*Client) StartLoad

func (client *Client) StartLoad(bytePerSecond uint64)

type LoadPacket

type LoadPacket struct {
	Seq       uint
	Payload   []byte
	Timestamp time.Time
}

func (*LoadPacket) PrintReceived

func (packet *LoadPacket) PrintReceived()

func (*LoadPacket) Size

func (packet *LoadPacket) Size() uint

func (*LoadPacket) String

func (packet *LoadPacket) String() string

type LoadStats

type LoadStats struct {
	Received *stats.Stats
	Missed   *stats.Stats

	Handler func(packet *LoadPacket)
	// contains filtered or unexported fields
}

func RegisterServer

func RegisterServer(server *protocols.Server) (*LoadStats, error)

Jump to

Keyboard shortcuts

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