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

@@ -24,7 +24,7 @@ type StreamRoute struct {
HealthMon health.HealthMonitor `json:"health"`
task task.Task
task *task.Task
l zerolog.Logger
}
@@ -47,8 +47,8 @@ func (r *StreamRoute) String() string {
return fmt.Sprintf("stream %s", r.Alias)
}
// Start implements task.TaskStarter.
func (r *StreamRoute) Start(providerSubtask task.Task) E.Error {
// Start implements*task.TaskStarter.
func (r *StreamRoute) Start(providerSubtask *task.Task) E.Error {
if entry.ShouldNotServe(r) {
providerSubtask.Finish("should not serve")
return nil