Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultWorkerPool ¶
func DefaultWorkerPool() cronx.Interceptor
DefaultWorkerPool returns a WorkerPool middleware with default configuration.
func Logger ¶
func Logger() cronx.Interceptor
Logger is a middleware that logs the current job start and finish.
func Recover ¶
func Recover() cronx.Interceptor
Recover is a middleware that recovers server from panic. Recover also dumps stack trace on panic occurrence.
func RequestID ¶
RequestID is a middleware that inject request id to the context if it doesn't exists.
func WorkerPool ¶
func WorkerPool(size int) cronx.Interceptor
WorkerPool is a middleware that limit total cron that can run a time. Program is running on a server with finite amount of resources such as CPU and RAM. By limiting the total number of jobs that can be run the same time, we protect the server from overloading.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.