summaryrefslogtreecommitdiff
path: root/worker_watcher.go
diff options
context:
space:
mode:
Diffstat (limited to 'worker_watcher.go')
-rwxr-xr-xworker_watcher.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/worker_watcher.go b/worker_watcher.go
index 3a89554d..84be44f2 100755
--- a/worker_watcher.go
+++ b/worker_watcher.go
@@ -84,7 +84,7 @@ type WorkerWatcher interface {
}
// workerCreateFunc can be nil, but in that case, dead stack will not be replaced
-func newWorkerWatcher(allocator func(args ...interface{}) (WorkerBase, error), numWorkers int64, events *util.EventHandler) *workerWatcher {
+func newWorkerWatcher(allocator Allocator, numWorkers int64, events util.EventsHandler) WorkerWatcher {
ww := &workerWatcher{
stack: NewWorkersStack(),
allocator: allocator,
@@ -99,10 +99,10 @@ func newWorkerWatcher(allocator func(args ...interface{}) (WorkerBase, error), n
type workerWatcher struct {
mutex sync.RWMutex
stack *Stack
- allocator func(args ...interface{}) (WorkerBase, error)
+ allocator Allocator
initialNumWorkers int64
actualNumWorkers int64
- events *util.EventHandler
+ events util.EventsHandler
}
func (ww *workerWatcher) AddToWatch(ctx context.Context, workers []WorkerBase) error {