worker

package
v0.0.0-...-b3bb260 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Starter

type Starter interface {
	Start()
}

type Task

type Task interface{}

type TaskHandler

type TaskHandler interface {
	Handle(t Task)
}

type TaskStop

type TaskStop struct{}

type Worker

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

func NewWorker

func NewWorker(name string, wg *sync.WaitGroup) *Worker

func (*Worker) Sender

func (w *Worker) Sender() chan<- Task

func (*Worker) Start

func (w *Worker) Start(handler TaskHandler)

func (*Worker) Stop

func (w *Worker) Stop()

Jump to

Keyboard shortcuts

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