Documentation ¶
Overview ¶
package bbr implements the BBR congestion control algorithm, as described in:
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Limiter ¶
type Limiter struct {
// contains filtered or unexported fields
}
A Limiter implements flowcontrol.FlowLimiter using the BBR algorithm.
func NewLimiter ¶
NewLimiter returns a new BBR-based flow limiter. The clock is used to measure message resposne times. If nil is passed (typical, except for testing & debugging), the system clock will be used.
type Snapshot ¶
type Snapshot struct {
// contains filtered or unexported fields
}
A Snapshot captures the internal state of a limiter at the time it was called, along with the current time. This is useful for debugging.
type SnapshottingLimiter ¶
type SnapshottingLimiter struct { Limiter *Limiter // The limiter to wrap RecordSnapshot func(Snapshot) // The callback to pass snapshots to }
A SnapshottingLimiter is a wrapper around Limiter which takes snapshots on each operation and passes them to a callback.
func (SnapshottingLimiter) Release ¶
func (l SnapshottingLimiter) Release()
func (SnapshottingLimiter) StartMessage ¶
func (l SnapshottingLimiter) StartMessage(ctx context.Context, size uint64) (gotResponse func(), err error)
Click to show internal directories.
Click to hide internal directories.