Documentation
¶
Index ¶
- Constants
- type RedisStore
- func (rs *RedisStore) Ack(queueName string, jobID string) error
- func (rs *RedisStore) DequeueMetrics(queueName string) (config.JobMetrics, error)
- func (r *RedisStore) EnqueueMetrics(metrics config.JobMetrics) error
- func (rs *RedisStore) GetDbConnection() interface{}
- func (r *RedisStore) IsHealthy() bool
- func (rs *RedisStore) Pop(queueName string) (job.JobContext, error)
- func (rs *RedisStore) Push(queueName string, jb job.Job, delay ...time.Duration) error
- func (rs *RedisStore) PushBatch(queueName string, jobs []job.Job, delay ...time.Duration) error
- func (rs *RedisStore) Retry(job job.Job, delay time.Duration) error
- func (rs *RedisStore) RetryJobWithMetadata(queueName string, queuedJob job.JobContext, delay ...time.Duration) error
- func (rs *RedisStore) Stop() error
Constants ¶
View Source
const ( MetricsQueueSuffix = ":metrics" MetricsAckQueueSuffix = ":metrics:ack" JobIndexKeyFormat = "job_index:%s" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisStore ¶
type RedisStore struct {
// contains filtered or unexported fields
}
func NewRedisStore ¶
func NewRedisStore(client *redis.Client, config config.Config, redisManager *manager.RedisClientManager, addr string, db int, logger logger.Logger) *RedisStore
func (*RedisStore) DequeueMetrics ¶
func (rs *RedisStore) DequeueMetrics(queueName string) (config.JobMetrics, error)
func (*RedisStore) EnqueueMetrics ¶
func (r *RedisStore) EnqueueMetrics(metrics config.JobMetrics) error
func (*RedisStore) GetDbConnection ¶
func (rs *RedisStore) GetDbConnection() interface{}
func (*RedisStore) IsHealthy ¶
func (r *RedisStore) IsHealthy() bool
func (*RedisStore) Pop ¶
func (rs *RedisStore) Pop(queueName string) (job.JobContext, error)
func (*RedisStore) Push ¶
Push supports optional delay. If delay is provided, job is scheduled in retry ZSET.
func (*RedisStore) PushBatch ¶
PushBatch adds multiple jobs to the Redis queue, supports optional delay for all jobs.
func (*RedisStore) RetryJobWithMetadata ¶
func (rs *RedisStore) RetryJobWithMetadata(queueName string, queuedJob job.JobContext, delay ...time.Duration) error
RetryJobWithMetadata pushes a job to the retry queue with retry metadata
func (*RedisStore) Stop ¶
func (rs *RedisStore) Stop() error
Stop gracefully stops the Redis store and its retry poller
Click to show internal directories.
Click to hide internal directories.