From da64d9fbab7d73e203e7dbbb9503f4d422feaab0 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Mon, 8 Feb 2021 23:21:54 +0300 Subject: BaseProcess interface as a return type in the worker_watcher,pool and worker interface --- pkg/worker_watcher/interface.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pkg/worker_watcher/interface.go') diff --git a/pkg/worker_watcher/interface.go b/pkg/worker_watcher/interface.go index ce5011c0..a3552e7e 100644 --- a/pkg/worker_watcher/interface.go +++ b/pkg/worker_watcher/interface.go @@ -9,13 +9,13 @@ import ( // Watcher is an interface for the Sync workers lifecycle type Watcher interface { // Watch used to add workers to the stack - Watch(workers []worker.SyncWorker) error + Watch(workers []worker.BaseProcess) error // Get provide first free worker - Get(ctx context.Context) (worker.SyncWorker, error) + Get(ctx context.Context) (worker.BaseProcess, error) // Push enqueues worker back - Push(w worker.SyncWorker) + Push(w worker.BaseProcess) // Allocate - allocates new worker and put it into the WorkerWatcher Allocate() error @@ -24,8 +24,8 @@ type Watcher interface { Destroy(ctx context.Context) // WorkersList return all stack w/o removing it from internal storage - List() []worker.SyncWorker + List() []worker.BaseProcess // RemoveWorker remove worker from the stack - Remove(wb worker.SyncWorker) error + Remove(wb worker.BaseProcess) error } -- cgit v1.2.3