jobs

package
v0.0.0-...-0f7ec88 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

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()

type Option

type Option func(j *JobHandler)

func WithConfig

func WithConfig(config *env.Config) Option

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL