Documentation ¶
Index ¶
- type WorkerWatcher
- func (ww *WorkerWatcher) Allocate() error
- func (ww *WorkerWatcher) Destroy(ctx context.Context)
- func (ww *WorkerWatcher) List() []*worker.Process
- func (ww *WorkerWatcher) Release(w *worker.Process)
- func (ww *WorkerWatcher) Remove(wb *worker.Process)
- func (ww *WorkerWatcher) Reset(ctx context.Context)
- func (ww *WorkerWatcher) Take(ctx context.Context) (*worker.Process, error)
- func (ww *WorkerWatcher) Watch(workers []*worker.Process) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WorkerWatcher ¶
func NewSyncWorkerWatcher ¶
func NewSyncWorkerWatcher(allocator pool.Allocator, log *zap.Logger, numWorkers uint64, allocateTimeout time.Duration) *WorkerWatcher
NewSyncWorkerWatcher is a constructor for the Watcher
func (*WorkerWatcher) Allocate ¶
func (ww *WorkerWatcher) Allocate() error
func (*WorkerWatcher) Destroy ¶
func (ww *WorkerWatcher) Destroy(ctx context.Context)
Destroy all underlying container (but let them complete the task)
func (*WorkerWatcher) List ¶
func (ww *WorkerWatcher) List() []*worker.Process
List - this is O(n) operation, and it will return copy of the actual workers
func (*WorkerWatcher) Release ¶
func (ww *WorkerWatcher) Release(w *worker.Process)
Release O(1) operation
func (*WorkerWatcher) Reset ¶
func (ww *WorkerWatcher) Reset(ctx context.Context)
Click to show internal directories.
Click to hide internal directories.