Versions in this module Expand all Collapse all v0 v0.0.5 May 28, 2025 Changes in this version type Manager + func NewManagerWithContainer(config Config, container *di.Container) Manager type RedisConfig + ProviderKey string v0.0.4 May 25, 2025 Changes in this version + func ExampleQueueWithScheduler() + func ExampleScheduledJobWithQueue() + func NewServiceProvider() di.ServiceProvider + func NewServiceProviderWithConfig(config Config) di.ServiceProvider + type AdapterConfig struct + Default string + Memory MemoryConfig + Redis RedisConfig + type Client interface + Close func() error + Enqueue func(taskName string, payload interface{}, opts ...Option) (*TaskInfo, error) + EnqueueAt func(taskName string, processAt time.Time, payload interface{}, opts ...Option) (*TaskInfo, error) + EnqueueContext func(ctx context.Context, taskName string, payload interface{}, opts ...Option) (*TaskInfo, error) + EnqueueIn func(taskName string, delay time.Duration, payload interface{}, opts ...Option) (*TaskInfo, error) + func NewClient(redisClient *redis.Client) Client + func NewClientWithAdapter(adapter adapter.QueueAdapter) Client + func NewClientWithUniversalClient(redisClient redis.UniversalClient) Client + func NewMemoryClient() Client + type ClientConfig struct + DefaultOptions ClientDefaultOptions + type ClientDefaultOptions struct + MaxRetry int + Queue string + Timeout int + type Config struct + Adapter AdapterConfig + Client ClientConfig + Server ServerConfig + func DefaultConfig() Config + type DeadLetterTask struct + FailedAt time.Time + Reason string + Task Task + type HandlerFunc func(ctx context.Context, task *Task) error + type Manager interface + Adapter func(name string) adapter.QueueAdapter + Client func() Client + MemoryAdapter func() adapter.QueueAdapter + RedisAdapter func() adapter.QueueAdapter + RedisClient func() redis.UniversalClient + Scheduler func() scheduler.Manager + Server func() Server + SetScheduler func(scheduler scheduler.Manager) + func NewManager() Manager + func NewManagerWithConfig(config Config) Manager + type MemoryConfig struct + Prefix string + type Option func(*TaskOptions) + func WithDeadline(t time.Time) Option + func WithDelay(d time.Duration) Option + func WithMaxRetry(n int) Option + func WithProcessAt(t time.Time) Option + func WithQueue(queue string) Option + func WithTaskID(id string) Option + func WithTimeout(d time.Duration) Option + type RedisClusterConfig struct + Addresses []string + Enabled bool + type RedisConfig struct + Address string + Client redis.UniversalClient + Cluster RedisClusterConfig + DB int + Password string + Prefix string + TLS bool + type Server interface + GetScheduler func() scheduler.Manager + RegisterHandler func(taskName string, handler HandlerFunc) + RegisterHandlers func(handlers map[string]HandlerFunc) + SetScheduler func(scheduler scheduler.Manager) + Start func() error + Stop func() error + func NewServer(redisClient redis.UniversalClient, opts ServerOptions) Server + func NewServerWithAdapter(adapter adapter.QueueAdapter, opts ServerOptions) Server + type ServerConfig struct + Concurrency int + DefaultQueue string + LogLevel int + PollingInterval int + Queues []string + RetryLimit int + ShutdownTimeout int + StrictPriority bool + type ServerOptions struct + Concurrency int + DefaultQueue string + LogLevel int + PollingInterval int + Queues []string + RetryLimit int + ShutdownTimeout time.Duration + StrictPriority bool + type ServiceProvider struct + func (p *ServiceProvider) Boot(app interface{}) + func (p *ServiceProvider) Register(app interface{}) + type Task struct + CreatedAt time.Time + ID string + MaxRetry int + Name string + Payload []byte + ProcessAt time.Time + Queue string + RetryCount int + func NewTask(name string, payload []byte) *Task + func (t *Task) Unmarshal(v interface{}) error + type TaskInfo struct + CreatedAt time.Time + ID string + MaxRetry int + Name string + ProcessAt time.Time + Queue string + State string + func (info *TaskInfo) String() string + type TaskOptions struct + Deadline time.Time + Delay time.Duration + MaxRetry int + ProcessAt time.Time + Queue string + TaskID string + Timeout time.Duration + func ApplyOptions(opts ...Option) *TaskOptions + func GetDefaultOptions() *TaskOptions