throttle

package
v0.0.0-...-a3d915e Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2014 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package throttle provides a net.Listener that returns artificially-delayed connections for testing real-world connectivity.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Listener

type Listener struct {
	net.Listener
	Down Rate // server Writes to Client
	Up   Rate // server Reads from client
}

func (*Listener) Accept

func (ln *Listener) Accept() (net.Conn, error)

type Rate

type Rate struct {
	KBps    int // or 0, to not rate-limit bandwidth
	Latency time.Duration
}

Jump to

Keyboard shortcuts

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