diff options
author | Valery Piashchynski <[email protected]> | 2021-02-08 23:21:54 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-02-08 23:21:54 +0300 |
commit | da64d9fbab7d73e203e7dbbb9503f4d422feaab0 (patch) | |
tree | 3dc3d5dd4a8c4de7d4b57baf2eeb1089f831bc1c /pkg/worker_watcher/interface.go | |
parent | 3e92e3df723ca1c4f152d8526eebfd7184e6fcec (diff) |
BaseProcess interface as a return type in the worker_watcher,pool and
worker interface
Diffstat (limited to 'pkg/worker_watcher/interface.go')
-rw-r--r-- | pkg/worker_watcher/interface.go | 10 |
1 files changed, 5 insertions, 5 deletions
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 } |