Documentation
¶
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
}
func NewLimiter ¶
func (*Limiter) Finish ¶
func (l *Limiter) Finish()
Finish will remove the goroutine from the waiting list and sends a signal to the waiting goroutine to access the resource
func (*Limiter) Wait ¶
func (l *Limiter) Wait()
Wait method waits if the number of concurrent requests is more than the limit specified. If a timeout is configured , then the goroutine will wait until the timeout occurs and then proceeds to access the resource irrespective of whether it has received a signal in the done channel.
func (*Limiter) WithTimeout ¶
Click to show internal directories.
Click to hide internal directories.