replace unnecessary Task interface with struct

This commit is contained in:
yusing
2024-12-17 09:32:51 +08:00
parent 4d94d12e9c
commit c5d96f96e1
15 changed files with 106 additions and 112 deletions

View File

@@ -13,7 +13,7 @@ import (
type (
Dispatcher struct {
task task.Task
task *task.Task
logCh chan *LogMessage
providers F.Set[Provider]
}
@@ -35,7 +35,7 @@ var (
const dispatchErr = "notification dispatch error"
func StartNotifDispatcher(parent task.Task) *Dispatcher {
func StartNotifDispatcher(parent *task.Task) *Dispatcher {
dispatcher = &Dispatcher{
task: parent.Subtask("notification dispatcher"),
logCh: make(chan *LogMessage),