scheduler

package
v0.0.88 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispatcher

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

func NewDispatcher

func NewDispatcher(burst int) *Dispatcher

func (*Dispatcher) AddTask

func (d *Dispatcher) AddTask(task *task_.Task) error

func (*Dispatcher) Stop

func (d *Dispatcher) Stop()

type Server

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

func NewServer

func NewServer(burst int, broker broker.Broker) *Server

func (*Server) AddTask

func (s *Server) AddTask(ctx context.Context, task *task_.Task) error

type Worker

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

func NewWorker

func NewWorker(id int, worksChCh chan chan *task.Task) *Worker

func (*Worker) Process

func (w *Worker) Process(ctx context.Context)

func (*Worker) Stop

func (w *Worker) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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