package
0.31.5
Repository: https://github.com/rnssolution/prism.git
Documentation: pkg.go.dev

# README

Data Flow Rate Control

To download and install this package run:

go get github.com/mxk/go-flowrate/flowrate

The documentation is available at:

http://godoc.org/github.com/mxk/go-flowrate/flowrate

# Functions

New creates a new flow control monitor.
NewReader restricts all Read operations on r to limit bytes per second.
NewWriter restricts all Write operations on w to limit bytes per second.

# Variables

ErrLimit is returned by the Writer when a non-blocking write is short due to the transfer rate limit.

# Structs

Monitor monitors and limits the transfer rate of a data stream.
Reader implements io.ReadCloser with a restriction on the rate of data transfer.
Status represents the current Monitor status.
Writer implements io.WriteCloser with a restriction on the rate of data transfer.

# Interfaces

Limiter is implemented by the Reader and Writer to provide a consistent interface for monitoring and controlling data transfer.

# Type aliases

Percent represents a percentage in increments of 1/1000th of a percent.