Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(rc *redis.Client, isDev bool, ex map[TaskID]TaskExecutor)
New initializes the queue tasks; intially called from cache package
func SetAsSubscriber ¶
func SetAsSubscriber()
SetAsSubscriber makes this instance a Pub/Sub subscriber. Each message queued will be processed by this instance. Creates a subscriber to channel "q"
Types ¶
type Email ¶
type Email struct {
Send func(p SendEmailParameter) error
}
type QueueTask ¶
type QueueTask struct { ID TaskID `json:"id"` Data interface{} `json:"data"` Created time.Time `json:"created"` }
QueueTask represents a queued task.
The Data field contains the necessary data for the task to execute properly.
type SendEmailParameter ¶
type TaskExecutor ¶
TaskExecutor is an interface used to execute tasks based on their ID.
Click to show internal directories.
Click to hide internal directories.