ccjh

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 4 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func New

func New(buffer int) *Handler

func (*Handler) Active added in v0.1.0

func (h *Handler) Active() int

func (*Handler) Add

func (h *Handler) Add(job Job) error

func (*Handler) Pending

func (h *Handler) Pending() int

func (*Handler) Reset

func (h *Handler) Reset() error

func (*Handler) Run

func (h *Handler) Run(maxJobs int, interval time.Duration) error

func (*Handler) RunAsync

func (h *Handler) RunAsync(maxJobs int, interval time.Duration) error

func (*Handler) Running

func (h *Handler) Running() bool

func (*Handler) Stop

func (h *Handler) Stop()

type Job

type Job interface {
	CallTarget(func())
	IsCanceled() bool
}

Jump to

Keyboard shortcuts

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