worker

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rely

type Rely interface {
	Context() context.Context
	GetChannel() <-chan *db.Task
	DeleteWorker(*Worker)
	WorkerStatus(w *Worker, str string)
	ExitWithError(e error)
	WriteStatus(n int64, net bool)
	Block() utils.Size
	Finish() <-chan struct{}

	GetRequest() (req *http.Request, e error)
	Do(req *http.Request) (resp *http.Response, e error)
}

type Worker

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

func New

func New(id int64, rely Rely) *Worker

func (*Worker) Serve

func (w *Worker) Serve()

type Writer

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

func (*Writer) Write

func (w *Writer) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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