mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-22 16:28:30 +02:00
replace unnecessary Task interface with struct
This commit is contained in:
@@ -27,7 +27,7 @@ type (
|
||||
impl
|
||||
*Config
|
||||
|
||||
task task.Task
|
||||
task *task.Task
|
||||
|
||||
pool Pool
|
||||
poolMu sync.Mutex
|
||||
@@ -52,7 +52,7 @@ func New(cfg *Config) *LoadBalancer {
|
||||
}
|
||||
|
||||
// Start implements task.TaskStarter.
|
||||
func (lb *LoadBalancer) Start(routeSubtask task.Task) E.Error {
|
||||
func (lb *LoadBalancer) Start(routeSubtask *task.Task) E.Error {
|
||||
lb.startTime = time.Now()
|
||||
lb.task = routeSubtask
|
||||
lb.task.OnFinished("loadbalancer cleanup", func() {
|
||||
|
||||
Reference in New Issue
Block a user