Documentation
¶
Overview ¶
Package shapeio provides connections throttling functionality. It is based on https://github.com/fujiwara/shapeio.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader implements the io.Reader interface and allows limiting reading speed.
func (*Reader) SetRateLimit ¶
SetRateLimit sets rate limit (bytes/sec) to the reader. It overrides the original limiter that was passed in NewReader.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer implements the io.Reader interface and allows limiting writing speed.
func (*Writer) SetRateLimit ¶
SetRateLimit sets rate limit (bytes/sec) to the writer. It overrides the original limiter that was passed in NewWriter.
Click to show internal directories.
Click to hide internal directories.