Documentation ¶
Index ¶
- Constants
- Variables
- func CleanupHandlers()
- func NewWrappedJob() *wingman.InternalJob
- func RegisterHandler(name string, h HandlerSig)
- func ResetLog()
- type Backend
- func (b *Backend) ClearJob(jobID string) error
- func (b *Backend) Close() error
- func (b *Backend) FailJob(job *wingman.InternalJob) error
- func (b *Backend) FailedJobs() uint64
- func (b *Backend) HasProcessingJob(processorID string) bool
- func (b *Backend) IncFailedJobs()
- func (b *Backend) IncSuccessfulJobs()
- func (b *Backend) LockJob(job *wingman.InternalJob) (wingman.LockID, error)
- func (b *Backend) Peek(queue string) (*wingman.InternalJob, error)
- func (b *Backend) PopJob(ctx context.Context, queue string) (*wingman.InternalJob, error)
- func (b *Backend) ProcessJob(job *wingman.InternalJob) error
- func (b *Backend) PushInternalJob(job *wingman.InternalJob) error
- func (b *Backend) PushJob(job wingman.Job) error
- func (b *Backend) ReleaseJob(job *wingman.InternalJob) error
- func (b *Backend) Size(queue string) uint64
- func (b *Backend) SuccessfulJobs() uint64
- type Event
- type HandlerSig
- type Job
- type TestLogger
Constants ¶
View Source
const DefaultJobType = "important job"
View Source
const DefaultQueue = "queue"
Variables ¶
View Source
var NoQueueError = errors.New("Job must specify a queue")
Functions ¶
func CleanupHandlers ¶
func CleanupHandlers()
func NewWrappedJob ¶
func NewWrappedJob() *wingman.InternalJob
func RegisterHandler ¶
func RegisterHandler(name string, h HandlerSig)
Types ¶
type Backend ¶
type Backend struct { LastAddedID string NextJobCanceledErr error // contains filtered or unexported fields }
func NewBackend ¶
func NewBackend() *Backend
func (*Backend) FailedJobs ¶ added in v0.2.1
func (*Backend) HasProcessingJob ¶ added in v0.1.2
func (*Backend) IncFailedJobs ¶ added in v0.2.1
func (b *Backend) IncFailedJobs()
func (*Backend) IncSuccessfulJobs ¶ added in v0.2.1
func (b *Backend) IncSuccessfulJobs()
func (*Backend) PopJob ¶ added in v0.6.0
PopJob assumes that only one goroutine is waiting on the notifier
func (*Backend) ProcessJob ¶
func (b *Backend) ProcessJob(job *wingman.InternalJob) error
func (*Backend) PushInternalJob ¶ added in v0.6.0
func (b *Backend) PushInternalJob(job *wingman.InternalJob) error
func (*Backend) ReleaseJob ¶ added in v0.2.3
func (b *Backend) ReleaseJob(job *wingman.InternalJob) error
func (*Backend) SuccessfulJobs ¶ added in v0.2.1
type Job ¶
type Job struct { Data string HandlerOverride string QueueOverride string LockKeyOverride string ConcurrencyOverride int Processed bool }
func (Job) Concurrency ¶ added in v0.2.3
func (*Job) InternalJob ¶
func (j *Job) InternalJob(queue string) *wingman.InternalJob
type TestLogger ¶ added in v0.1.1
var TestLog *TestLogger
func (*TestLogger) AddEvent ¶ added in v0.2.1
func (l *TestLogger) AddEvent(event Event)
func (*TestLogger) Count ¶ added in v0.2.1
func (l *TestLogger) Count() int
func (*TestLogger) EventAtIndex ¶ added in v0.2.1
func (l *TestLogger) EventAtIndex(i int) Event
func (*TestLogger) EventByMessage ¶ added in v0.2.1
func (l *TestLogger) EventByMessage(msg string) (Event, bool)
func (*TestLogger) Fatal ¶ added in v0.1.1
func (l *TestLogger) Fatal() *zerolog.Event
Click to show internal directories.
Click to hide internal directories.