Skip to content

Instantly share code, notes, and snippets.

@soheilhy
Last active August 29, 2015 14:24
Show Gist options
  • Save soheilhy/580be579f22e07681230 to your computer and use it in GitHub Desktop.
Save soheilhy/580be579f22e07681230 to your computer and use it in GitHub Desktop.
Messages in taskq
// Enqueue enqueus a task.
type Enque struct {
Task // The task to be enqueued.
}
// Deque represents a message emitted to dequeue a task from a queue.
type Deque struct {
Queue // The queue to dequeue a task from.
}
// Ack represents a message emitted to acknowledge a previously dequeued task.
type Ack struct {
TaskID uint64 // The task ID.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment