Documentation ¶
Overview ¶
How can I check that a running asynctask worker can otherwise process a new message within 5 seconds (health check)? - `curl 127.0.0.1:5000/health?timeout=5&queue=gobay.task_sub` - `curl 127.0.0.1:5000/health?timeout=5` **default queue**
Index ¶
- type AsyncTaskExt
- func (t *AsyncTaskExt) Application() *gobay.Application
- func (t *AsyncTaskExt) Close() error
- func (t *AsyncTaskExt) Init(app *gobay.Application) error
- func (t *AsyncTaskExt) Object() interface{}
- func (t *AsyncTaskExt) RegisterWorkerHandler(name string, handler interface{}) error
- func (t *AsyncTaskExt) RegisterWorkerHandlers(handlers map[string]interface{}) error
- func (t *AsyncTaskExt) SendTask(sign *tasks.Signature) (*result.AsyncResult, error)
- func (t *AsyncTaskExt) SendTaskWithContext(ctx context.Context, sign *tasks.Signature) (*result.AsyncResult, error)
- func (t *AsyncTaskExt) StartWorker(queue string, concurrency int, enableHealthCheck bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncTaskExt ¶
type AsyncTaskExt struct { NS string // contains filtered or unexported fields }
func (*AsyncTaskExt) Application ¶
func (t *AsyncTaskExt) Application() *gobay.Application
func (*AsyncTaskExt) Close ¶
func (t *AsyncTaskExt) Close() error
func (*AsyncTaskExt) Init ¶
func (t *AsyncTaskExt) Init(app *gobay.Application) error
func (*AsyncTaskExt) Object ¶
func (t *AsyncTaskExt) Object() interface{}
func (*AsyncTaskExt) RegisterWorkerHandler ¶
func (t *AsyncTaskExt) RegisterWorkerHandler(name string, handler interface{}) error
RegisterWorkerHandler add task handler to worker to process task messages
func (*AsyncTaskExt) RegisterWorkerHandlers ¶ added in v0.8.0
func (t *AsyncTaskExt) RegisterWorkerHandlers(handlers map[string]interface{}) error
RegisterWorkerHandlers add task handlers to worker to process task messages
func (*AsyncTaskExt) SendTask ¶
func (t *AsyncTaskExt) SendTask(sign *tasks.Signature) (*result.AsyncResult, error)
SendTask publish task messages to broker
func (*AsyncTaskExt) SendTaskWithContext ¶ added in v0.14.6
func (t *AsyncTaskExt) SendTaskWithContext(ctx context.Context, sign *tasks.Signature) (*result.AsyncResult, error)
SendTask publish task messages with context to broker
func (*AsyncTaskExt) StartWorker ¶
func (t *AsyncTaskExt) StartWorker(queue string, concurrency int, enableHealthCheck bool) error
StartWorker start a worker that consume task messages for queue
Click to show internal directories.
Click to hide internal directories.