Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RestRequestRoutes ¶
type RestRequestRoutes struct {
// contains filtered or unexported fields
}
RestRequestRoutes is the routes for Rest Request
func (*RestRequestRoutes) AddToRoutes ¶
func (r *RestRequestRoutes) AddToRoutes(routes []Route)
AddToRoutes adds more routes
type Route ¶
type Route struct { Name string Method string Pattern string HandlerFunc http.HandlerFunc }
Route defines a rest api
type TaskQueue ¶
type TaskQueue struct {
// contains filtered or unexported fields
}
TaskQueue is rate limiting queue for task
func NewTaskQueue ¶
NewTaskQueue creates a queue maxRetries limit retry number, no limit if maxRetries=0 1s, 2s, 4s, 8s, 16s, 32s, 60s, 60s, 60s, ...
func (*TaskQueue) AddRateLimited ¶
AddRateLimited a task
func (*TaskQueue) NumRequeues ¶
NumRequeues get number of task retried
Click to show internal directories.
Click to hide internal directories.