Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClaimableJob ¶
type ClaimableJob interface { Claim() (bool, error) GetKey() string PushKeyIntoQueue(name string) error }
ClaimableJob represents a job in the queue that can know if it should have action taken upon it
type ClaimableRedisJob ¶
type ClaimableRedisJob struct {
// contains filtered or unexported fields
}
ClaimableRedisJob implements ClaimableJob and stores/retrieves jobs from Redis
func NewFromJob ¶
func NewFromJob(job Job, conn Conn) *ClaimableRedisJob
NewFromJob returns a new job based on a Job
func (*ClaimableRedisJob) Claim ¶
func (job *ClaimableRedisJob) Claim() (bool, error)
Claim returns true when the caller succesfully claims the job
func (*ClaimableRedisJob) GetKey ¶
func (job *ClaimableRedisJob) GetKey() string
GetKey returns the key to store the information about the job
func (*ClaimableRedisJob) PushKeyIntoQueue ¶
func (job *ClaimableRedisJob) PushKeyIntoQueue(queueName string) error
PushKeyIntoQueue pushes a key into a queue
Click to show internal directories.
Click to hide internal directories.