Skip to content

Commit

Permalink
more lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vivek-ng committed Nov 24, 2020
1 parent 8da809e commit b442305
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions priority/priorityRateLimiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const (
//
// timeout: If this field is specified , goroutines will be automatically removed from the waitlist
// after the time passes the timeout specified even if the number of concurrent requests is greater than the limit. (in ms)
// PriorityLimiter ....
type PriorityLimiter struct {
count int
limit int
Expand Down Expand Up @@ -67,15 +68,15 @@ func NewLimiter(limit int, options ...Option) *PriorityLimiter {
return nl
}

// WithDynamicPriority: If this field is specified , priority is increased for low priority goroutines periodically by the
// WithDynamicPriority : If this field is specified , priority is increased for low priority goroutines periodically by the
// interval specified by dynamicPeriod
func WithDynamicPriority(dynamicPeriod int) func(*PriorityLimiter) {
return func(p *PriorityLimiter) {
p.dynamicPeriod = &dynamicPeriod
}
}

// WithTimeout: If this field is specified , goroutines will be automatically removed from the waitlist
// WithTimeout : If this field is specified , goroutines will be automatically removed from the waitlist
// after the time passes the timeout specified even if the number of concurrent requests is greater than the limit.
func WithTimeout(timeout int) func(*PriorityLimiter) {
return func(p *PriorityLimiter) {
Expand Down
3 changes: 2 additions & 1 deletion rateLimiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type waiter struct {
//
// timeout: If this field is specified , goroutines will be automatically removed from the waitlist
// after the time passes the timeout specified even if the number of concurrent requests is greater than the limit. (in ms)
// Limiter ....
type Limiter struct {
count int
limit int
Expand All @@ -47,7 +48,7 @@ func New(limit int, options ...Option) *Limiter {
return l
}

// WithTimeout: If this field is specified , goroutines will be automatically removed from the waitlist
// WithTimeout : If this field is specified , goroutines will be automatically removed from the waitlist
// after the time passes the timeout specified even if the number of concurrent requests is greater than the limit.
func WithTimeout(timeout int) func(*Limiter) {
return func(l *Limiter) {
Expand Down

0 comments on commit b442305

Please sign in to comment.