worker

package
v0.0.0-...-20cf3ba Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2022 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WORKER_FD = 3 + iota // stdin, stdout, stderr, ...
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Child

type Child struct {
	MemQuota int
	// contains filtered or unexported fields
}

func (*Child) Handler

func (c *Child) Handler(ctx context.Context) segment.Handler

func (*Child) Restart

func (c *Child) Restart(ctx context.Context)

func (*Child) Start

func (c *Child) Start(ctx context.Context) error

type InProcess

type InProcess struct {
}

func (*InProcess) Handler

func (ip *InProcess) Handler(ctx context.Context) segment.Handler

func (*InProcess) Restart

func (ip *InProcess) Restart(ctx context.Context)

func (*InProcess) Start

func (ip *InProcess) Start(ctx context.Context) error

startWorker runs in the child process

type Parent

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

func (*Parent) HandleSegment

func (w *Parent) HandleSegment(request *segment.Request, resp *segment.Response) error

func (*Parent) Handler

func (w *Parent) Handler(ctx context.Context) segment.Handler

func (*Parent) Restart

func (p *Parent) Restart(ctx context.Context)

func (*Parent) Start

func (p *Parent) Start(ctx context.Context) error

type Worker

type Worker interface {
	Start(ctx context.Context) (err error)
	Restart(ctx context.Context)
	Handler(ctx context.Context) segment.Handler
}

Jump to

Keyboard shortcuts

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