Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ThrottledWriter ¶
ThrottledWriter is a writer that throttles what it writes it also implements io.ReaderFrom
func NewThrottleWriter ¶
func NewThrottleWriter(w io.Writer, speed, minWrite int64) *ThrottledWriter
NewThrottleWriter creates a new throttledWriter writing in the provided io.Writer speed is the desired speed, while min and max Writes is the minimum or max writes that will be made at a time to the underlying writer. Notice: if minWrite is bigger than speed it will become equal to it.
Click to show internal directories.
Click to hide internal directories.