Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTooManyWaiters = fmt.Errorf("rejecting request, too many waiters")
Functions ¶
This section is empty.
Types ¶
type BoundedQueue ¶
type BoundedQueue struct {
// contains filtered or unexported fields
}
func NewBoundedQueue ¶
func NewBoundedQueue(maxLimitBytes, maxLimitWaiters int64) *BoundedQueue
func (*BoundedQueue) Acquire ¶
func (bq *BoundedQueue) Acquire(ctx context.Context, pendingBytes int64) error
func (*BoundedQueue) Release ¶
func (bq *BoundedQueue) Release(pendingBytes int64) error
func (*BoundedQueue) TryAcquire ¶
func (bq *BoundedQueue) TryAcquire(pendingBytes int64) bool
Click to show internal directories.
Click to hide internal directories.