Provide typed tasks.
This commit is contained in:
parent
3f46617f80
commit
d0539687bb
7 changed files with 133 additions and 104 deletions
|
|
@ -1,9 +1,9 @@
|
|||
package tasks
|
||||
|
||||
// TypeExample is the type for the example task.
|
||||
// This is what is passed in to TaskClient.New() when creating a new task
|
||||
const TypeExample = "example_task"
|
||||
|
||||
type ExampleTask struct {
|
||||
Message string
|
||||
}
|
||||
|
||||
func (t ExampleTask) Name() string {
|
||||
return "example_task"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue