taskpoll

package
v0.0.0-...-10a0d72 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TaskPollController

type TaskPollController struct {
	// contains filtered or unexported fields
}

func NewTaskPollController

func NewTaskPollController(name string, concurrency uint, interval time.Duration, emptyWait time.Duration) *TaskPollController

func (*TaskPollController) AwaitingCount

func (tpc *TaskPollController) AwaitingCount() int

func (*TaskPollController) Name

func (tpc *TaskPollController) Name() string

func (*TaskPollController) Push

func (*TaskPollController) Remove

func (tpc *TaskPollController) Remove(id string, exitCode TaskPollExitCode)

func (*TaskPollController) Start

func (tpc *TaskPollController) Start()

type TaskPollExitCode

type TaskPollExitCode uint
const (
	TPExitSuccess TaskPollExitCode = iota
	TPExitError
	TPExitInterrupt
)

type TaskPollItem

type TaskPollItem interface {
	ID() string
	TaskName() string
	Weight() uint
	Count() int

	Yield(i int, tpc *TaskPollController)
	OnExit(exitCode TaskPollExitCode)
	Init() TaskPollItem
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL