Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // same IP can submit x tasks per 24 hours IP = &Limiter{ name: "limitIP", max: 10, c: cache.New(day, time.Hour), } // a task can sent x emails before the resume Sent = &Limiter{ name: "limitSent", max: 5, c: cache.New(day*365, day*365), } // one address can receive x emails per 24 hours Recv = &Limiter{ name: "limitRecv", max: 50, c: cache.New(day, time.Hour), } )
View Source
var (
ErrExceeded = errors.New("can not handle your request due to limiter")
)
error
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.