Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalExecutor ¶
type LocalExecutor struct {
// contains filtered or unexported fields
}
func NewLocalExecutor ¶
func NewLocalExecutor(maxParallelism, maxQueueSize int) *LocalExecutor
func (*LocalExecutor) Close ¶
func (ex *LocalExecutor) Close() error
func (*LocalExecutor) GetGroupTasks ¶
func (ex *LocalExecutor) GetGroupTasks(groupID interface{}) int
func (*LocalExecutor) Start ¶
func (ex *LocalExecutor) Start()
func (*LocalExecutor) Submit ¶
func (ex *LocalExecutor) Submit(t *Task) bool
func (*LocalExecutor) SubmitAfter ¶
func (ex *LocalExecutor) SubmitAfter(t *Task, after time.Duration) bool
type Task ¶
type Task struct { // TaskID is used to ensure that there is only one instance of this task TaskID interface{} // GroupID is used to group together tasks. GroupID interface{} // Apply is the work that the task comprises. Apply func() error }
Task is the unit of execution that the executor will execute.
Click to show internal directories.
Click to hide internal directories.