Documentation ¶
Overview ¶
Package workr ...
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Concurrency int RedisHost string RedisPort int RedisPassword string RedisDB int RedisQueueName string Logger *zap.Logger }
Config for workr
type Job ¶
type Job interface { Name() string New() Job Run(*Workr) error Bytes() ([]byte, error) Load(data []byte) error }
Job represent a job
type QueueItem ¶
QueueItem represent an item in the queue
type Workr ¶
type Workr struct { Config *Config RedisClient *redis.Client // contains filtered or unexported fields }
Workr define main worker instance
func (*Workr) RedisConnect ¶
RedisConnect connect to redis and ping it
Click to show internal directories.
Click to hide internal directories.