NewBandwidth create new bandwidth limiter
(totalBytes int64)
| 19 | |
| 20 | // NewBandwidth create new bandwidth limiter |
| 21 | func NewBandwidth(totalBytes int64) *Bandwidth { |
| 22 | return &Bandwidth{totalBytes: totalBytes} |
| 23 | } |
| 24 | |
| 25 | // Ack acquire next chance to send data |
| 26 | func (this *Bandwidth) Ack(ctx context.Context, newBytes int) { |
no outgoing calls