Documentation
¶
Index ¶
- Variables
- func MustMarshal(v any) []byte
- func MustUnmarshal(data []byte, v any) error
- type AsynqAdapter
- func (q *AsynqAdapter) Enqueue(task *QueueTask, opts ...TaskOption) error
- func (q *AsynqAdapter) EnqueueAt(task *QueueTask, at time.Time, opts ...TaskOption) error
- func (q *AsynqAdapter) EnqueueDelayed(task *QueueTask, delay time.Duration, opts ...TaskOption) error
- func (q *AsynqAdapter) Name() string
- func (q *AsynqAdapter) RegisterHandler(taskType string, handler TaskHandler) error
- func (q *AsynqAdapter) Start(ctx context.Context) error
- func (q *AsynqAdapter) Stats() QueueStats
- func (q *AsynqAdapter) Stop(ctx context.Context) error
- type AsynqConfig
- type AsynqSchedulerAdapter
- func (s *AsynqSchedulerAdapter) AddIntervalJob(interval time.Duration, name string, handler JobHandler) error
- func (s *AsynqSchedulerAdapter) AddJob(cronExpr string, name string, handler JobHandler) error
- func (s *AsynqSchedulerAdapter) Jobs() []JobInfo
- func (s *AsynqSchedulerAdapter) RemoveJob(name string) error
- func (s *AsynqSchedulerAdapter) RunJob(name string) error
- func (s *AsynqSchedulerAdapter) Start() error
- func (s *AsynqSchedulerAdapter) Stop(ctx context.Context) error
- type CronScheduler
- type CronSchedulerAlias
- type JobHandler
- type JobHandlerAlias
- type JobInfo
- type QueueConfig
- type QueueConfigAlias
- type QueueFactory
- type QueueFactoryAlias
- type QueueStats
- type QueueTask
- type ResultStore
- type ResultStoreAlias
- type RobfigCronAdapter
- func (s *RobfigCronAdapter) AddIntervalJob(interval time.Duration, name string, handler JobHandler) error
- func (s *RobfigCronAdapter) AddJob(cronExpr string, name string, handler JobHandler) error
- func (s *RobfigCronAdapter) Jobs() []JobInfo
- func (s *RobfigCronAdapter) RemoveJob(name string) error
- func (s *RobfigCronAdapter) RunJob(name string) error
- func (s *RobfigCronAdapter) Start() error
- func (s *RobfigCronAdapter) Stop(ctx context.Context) error
- type RobfigCronOption
- type SchedulerConfig
- type SchedulerConfigAlias
- type TaskHandler
- type TaskHandlerAlias
- type TaskOption
- type TaskOptionAlias
- type TaskOptions
- type TaskOptionsAlias
- type TaskQueue
- type TaskQueueAlias
- type TaskResult
Constants ¶
This section is empty.
Variables ¶
View Source
var WithMaxRetryAlias = abstract.WithMaxRetry
View Source
var WithTimeoutAlias = abstract.WithTimeout
View Source
var WithUniqueAlias = abstract.WithUnique
Functions ¶
func MustMarshal ¶
func MustUnmarshal ¶
Types ¶
type AsynqAdapter ¶
type AsynqAdapter struct {
// contains filtered or unexported fields
}
func (*AsynqAdapter) Enqueue ¶
func (q *AsynqAdapter) Enqueue(task *QueueTask, opts ...TaskOption) error
func (*AsynqAdapter) EnqueueAt ¶
func (q *AsynqAdapter) EnqueueAt(task *QueueTask, at time.Time, opts ...TaskOption) error
func (*AsynqAdapter) EnqueueDelayed ¶
func (q *AsynqAdapter) EnqueueDelayed(task *QueueTask, delay time.Duration, opts ...TaskOption) error
func (*AsynqAdapter) Name ¶
func (q *AsynqAdapter) Name() string
func (*AsynqAdapter) RegisterHandler ¶
func (q *AsynqAdapter) RegisterHandler(taskType string, handler TaskHandler) error
func (*AsynqAdapter) Stats ¶
func (q *AsynqAdapter) Stats() QueueStats
type AsynqConfig ¶
type AsynqSchedulerAdapter ¶
type AsynqSchedulerAdapter struct {
// contains filtered or unexported fields
}
func (*AsynqSchedulerAdapter) AddIntervalJob ¶
func (s *AsynqSchedulerAdapter) AddIntervalJob(interval time.Duration, name string, handler JobHandler) error
func (*AsynqSchedulerAdapter) AddJob ¶
func (s *AsynqSchedulerAdapter) AddJob(cronExpr string, name string, handler JobHandler) error
func (*AsynqSchedulerAdapter) Jobs ¶
func (s *AsynqSchedulerAdapter) Jobs() []JobInfo
func (*AsynqSchedulerAdapter) RemoveJob ¶
func (s *AsynqSchedulerAdapter) RemoveJob(name string) error
func (*AsynqSchedulerAdapter) RunJob ¶
func (s *AsynqSchedulerAdapter) RunJob(name string) error
func (*AsynqSchedulerAdapter) Start ¶
func (s *AsynqSchedulerAdapter) Start() error
type CronScheduler ¶
type CronScheduler interface {
AddJob(cronExpr string, name string, handler JobHandler) error
AddIntervalJob(interval time.Duration, name string, handler JobHandler) error
RemoveJob(name string) error
RunJob(name string) error
Start() error
Stop(ctx context.Context) error
Jobs() []JobInfo
}
func NewAsynqScheduler ¶
func NewAsynqScheduler(redisAddr string) CronScheduler
func NewMemoryCronScheduler ¶
func NewMemoryCronScheduler() CronScheduler
func NewRobfigCronScheduler ¶
func NewRobfigCronScheduler(opts ...RobfigCronOption) CronScheduler
type CronSchedulerAlias ¶
type CronSchedulerAlias = abstract.CronScheduler
type JobHandler ¶
type JobHandlerAlias ¶
type JobHandlerAlias = abstract.JobHandler
type QueueConfig ¶
type QueueConfigAlias ¶
type QueueConfigAlias = abstract.QueueConfig
type QueueFactory ¶
type QueueFactory interface {
CreateQueue(name string, opts QueueConfig) (TaskQueue, error)
CreateScheduler(opts SchedulerConfig) (CronScheduler, error)
}
func NewMemoryQueueFactory ¶
func NewMemoryQueueFactory() QueueFactory
type QueueFactoryAlias ¶
type QueueFactoryAlias = abstract.QueueFactory
type QueueStats ¶
type ResultStore ¶
type ResultStoreAlias ¶
type ResultStoreAlias = abstract.ResultStore
type RobfigCronAdapter ¶
type RobfigCronAdapter struct {
// contains filtered or unexported fields
}
func (*RobfigCronAdapter) AddIntervalJob ¶
func (s *RobfigCronAdapter) AddIntervalJob(interval time.Duration, name string, handler JobHandler) error
func (*RobfigCronAdapter) AddJob ¶
func (s *RobfigCronAdapter) AddJob(cronExpr string, name string, handler JobHandler) error
func (*RobfigCronAdapter) Jobs ¶
func (s *RobfigCronAdapter) Jobs() []JobInfo
func (*RobfigCronAdapter) RemoveJob ¶
func (s *RobfigCronAdapter) RemoveJob(name string) error
func (*RobfigCronAdapter) RunJob ¶
func (s *RobfigCronAdapter) RunJob(name string) error
func (*RobfigCronAdapter) Start ¶
func (s *RobfigCronAdapter) Start() error
type RobfigCronOption ¶
type RobfigCronOption func(*robfigCronOptions)
func WithCronLogger ¶
func WithCronLogger(logger cron.Logger) RobfigCronOption
func WithSeconds ¶
func WithSeconds() RobfigCronOption
func WithTimezone ¶
func WithTimezone(tz *time.Location) RobfigCronOption
type SchedulerConfig ¶
type SchedulerConfigAlias ¶
type SchedulerConfigAlias = abstract.SchedulerConfig
type TaskHandlerAlias ¶
type TaskHandlerAlias = abstract.TaskHandler
type TaskOption ¶
type TaskOption func(*TaskOptions)
func WithMaxRetry ¶
func WithMaxRetry(n int) TaskOption
func WithTimeout ¶
func WithTimeout(d time.Duration) TaskOption
func WithUnique ¶
func WithUnique() TaskOption
type TaskOptionAlias ¶
type TaskOptionAlias = abstract.TaskOption
type TaskOptions ¶
type TaskOptionsAlias ¶
type TaskOptionsAlias = abstract.TaskOptions
type TaskQueue ¶
type TaskQueue interface {
Enqueue(task *QueueTask, opts ...TaskOption) error
EnqueueDelayed(task *QueueTask, delay time.Duration, opts ...TaskOption) error
EnqueueAt(task *QueueTask, at time.Time, opts ...TaskOption) error
RegisterHandler(taskType string, handler TaskHandler) error
Start(ctx context.Context) error
Stop(ctx context.Context) error
Stats() QueueStats
Name() string
}
func NewAsynqQueue ¶
func NewAsynqQueue(name string, config AsynqConfig) TaskQueue
type TaskQueueAlias ¶
Click to show internal directories.
Click to hide internal directories.