Skip to content

Instantly share code, notes, and snippets.

@soheilhy
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soheilhy/f25e78b79330d7067b6b to your computer and use it in GitHub Desktop.
Save soheilhy/f25e78b79330d7067b6b to your computer and use it in GitHub Desktop.
Basic structures in taskq
// Queue represents a named queue.
type Queue string
// Task represents a task in a queue.
type Task struct {
ID uint64 `json:"id"` // Task's globally unique ID assigned by taskq.
Queue Queue `json:"queue"` // Task's queue.
Body []byte `json:"body"` // Task's client data.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment