Provide typed tasks.

This commit is contained in:
mikestefanello 2024-06-18 21:46:52 -04:00
parent 3f46617f80
commit d0539687bb
7 changed files with 133 additions and 104 deletions

View file

@ -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"
}