Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewThrottledConnection ¶
NewThrottledConnection creates a throttled connection which is done by https://github.com/juju/ratelimit
Types ¶
type IPConnCount ¶
type IPConnCount struct {
// contains filtered or unexported fields
}
IPConnCount keep tracks of how many connections allowed per IP
func NewIPConnCount ¶
func NewIPConnCount() *IPConnCount
func (*IPConnCount) DecCount ¶
func (ipc *IPConnCount) DecCount(clientIP string)
func (*IPConnCount) IncCount ¶
func (ipc *IPConnCount) IncCount(clientIP string) int
func (*IPConnCount) Read ¶
func (ipc *IPConnCount) Read(clientIP string) int
Click to show internal directories.
Click to hide internal directories.