Documentation
¶
Index ¶
- Constants
- func New(options ...Option) interfaces.JobHandler
- type JobHandler
- func (j *JobHandler) CancelJob(key interfaces.JobKey, jobID string) error
- func (j *JobHandler) Init() error
- func (j *JobHandler) Listen() error
- func (j *JobHandler) OnEvent(key interfaces.JobKey, f func(params map[string]interface{}) error)
- func (j *JobHandler) SendEvent(key interfaces.JobKey, jobID string, params map[string]interface{}) (*models.Job, error)
- func (j *JobHandler) Shutdown() error
- func (j *JobHandler) Start() error
- func (j *JobHandler) WaitAvailable()
- type Option
Constants ¶
View Source
const ( // Web related jobs / notification NotifySendDm = "send_dm" // Events EventNewListing = "new_listing" EventRemoveListing = "remove_listing" EventRescheduleAuction = "reschedule_auction" EventUpdateAuction = "update_auction" EventNewAuction = "new_auction" EventRemoveAuction = "remove_auction" EventBidAuction = "bid_auction" )
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(options ...Option) interfaces.JobHandler
Types ¶
type JobHandler ¶
type JobHandler struct {
// contains filtered or unexported fields
}
func (*JobHandler) CancelJob ¶
func (j *JobHandler) CancelJob(key interfaces.JobKey, jobID string) error
func (*JobHandler) Init ¶
func (j *JobHandler) Init() error
func (*JobHandler) Listen ¶
func (j *JobHandler) Listen() error
func (*JobHandler) OnEvent ¶
func (j *JobHandler) OnEvent(key interfaces.JobKey, f func(params map[string]interface{}) error)
func (*JobHandler) SendEvent ¶
func (j *JobHandler) SendEvent(key interfaces.JobKey, jobID string, params map[string]interface{}) (*models.Job, error)
func (*JobHandler) Shutdown ¶
func (j *JobHandler) Shutdown() error
func (*JobHandler) Start ¶
func (j *JobHandler) Start() error
func (*JobHandler) WaitAvailable ¶
func (j *JobHandler) WaitAvailable()
Click to show internal directories.
Click to hide internal directories.