Documentation
¶
Index ¶
- type Executor
- type TaskQueue
- type WorkerTaskQueue
- func (tq *WorkerTaskQueue) PushTask(p peer.ID, task peertask.Task)
- func (tq *WorkerTaskQueue) Remove(topic peertask.Topic, p peer.ID)
- func (tq *WorkerTaskQueue) Shutdown()
- func (tq *WorkerTaskQueue) Startup(workerCount uint64, executor Executor)
- func (tq *WorkerTaskQueue) Stats() graphsync.RequestStats
- func (tq *WorkerTaskQueue) TaskDone(p peer.ID, task *peertask.Task)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WorkerTaskQueue ¶
type WorkerTaskQueue struct {
// contains filtered or unexported fields
}
TaskQueue is a wrapper around peertaskqueue.PeerTaskQueue that manages running workers that pop tasks and execute them
func NewTaskQueue ¶
func NewTaskQueue(ctx context.Context) *WorkerTaskQueue
NewTaskQueue initializes a new queue
func (*WorkerTaskQueue) PushTask ¶
func (tq *WorkerTaskQueue) PushTask(p peer.ID, task peertask.Task)
PushTask pushes a new task on to the queue
func (*WorkerTaskQueue) Remove ¶ added in v0.10.6
func (tq *WorkerTaskQueue) Remove(topic peertask.Topic, p peer.ID)
Remove removes a task from the execution queue
func (*WorkerTaskQueue) Shutdown ¶
func (tq *WorkerTaskQueue) Shutdown()
Shutdown shuts down all running workers
func (*WorkerTaskQueue) Startup ¶
func (tq *WorkerTaskQueue) Startup(workerCount uint64, executor Executor)
Startup runs the given number of task workers with the given executor
func (*WorkerTaskQueue) Stats ¶ added in v0.10.3
func (tq *WorkerTaskQueue) Stats() graphsync.RequestStats
Stats returns statistics about a task queue
Click to show internal directories.
Click to hide internal directories.