-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generalize task data to []byte + remove the "Remove" func
- Loading branch information
1 parent
fddafa7
commit 5d762c4
Showing
4 changed files
with
45 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,15 @@ | ||
package boomerang | ||
|
||
import "time" | ||
|
||
type Task struct { | ||
Kind string | ||
ID string | ||
Interval time.Duration | ||
Data any | ||
Kind string | ||
ID string | ||
Data []byte | ||
} | ||
|
||
func NewTask(kind, id string, interval time.Duration, data any) *Task { | ||
func NewTask(kind string, id string, data []byte) *Task { | ||
return &Task{ | ||
Kind: kind, | ||
ID: id, | ||
Interval: interval, | ||
Data: data, | ||
Kind: kind, | ||
ID: id, | ||
Data: data, | ||
} | ||
} |