Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServerLimiter ¶
type ServerLimiter map[string]chan struct{}
ServerLimiter provides interface to limit amount of requests
func NewServerLimiter ¶
func NewServerLimiter(servers []string, l int) ServerLimiter
NewServerLimiter creates a limiter for specific servers list.
func (ServerLimiter) Enter ¶
func (sl ServerLimiter) Enter(s string)
Enter claims one of free slots or blocks until there is one.
Click to show internal directories.
Click to hide internal directories.