Documentation ¶
Index ¶
- func NewWorkerWatcher(allocator worker.Allocator, numWorkers int64, events events.Handler) worker.Watcher
- type Stack
- func (stack *Stack) Destroy(ctx context.Context)
- func (stack *Stack) FindAndRemoveByPid(pid int64) bool
- func (stack *Stack) IsEmpty() bool
- func (stack *Stack) Pop() (worker.BaseProcess, bool)
- func (stack *Stack) Push(w worker.BaseProcess)
- func (stack *Stack) Reset()
- func (stack *Stack) Workers() []worker.BaseProcess
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Stack ¶
type Stack struct {
// contains filtered or unexported fields
}
func NewWorkersStack ¶
func NewWorkersStack() *Stack
func (*Stack) FindAndRemoveByPid ¶
func (*Stack) Push ¶
func (stack *Stack) Push(w worker.BaseProcess)
Push worker back to the stack If stack in destroy state, Push will provide 100ms window to unlock the mutex
func (*Stack) Workers ¶
func (stack *Stack) Workers() []worker.BaseProcess
Workers return copy of the workers in the stack
Click to show internal directories.
Click to hide internal directories.