worker

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Platform = "Worker"
)

Variables

This section is empty.

Functions

func Serve

func Serve(configs Configs, workers []Worker, di DI)

Types

type Configs

type Configs struct {
	WorkerPort netext.Port `env:"WORKER_PORT" envDefault:"7337"`
}

type DI

type DI map[string]func(ctx context.Context) any

type Handler

type Handler struct {
}

func (Handler) ServeHTTP

func (Handler) ServeHTTP(res http.ResponseWriter, req *http.Request)

type Worker

type Worker interface {
	RegisterWorker(ctx context.Context)
}

Jump to

Keyboard shortcuts

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