service

package
v0.0.0-...-61436bd Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	API_INDEX   = "/api"
	API_DEVICES = API_INDEX + "/devices"
	API_UPDATES = API_INDEX + "/updates"
)
View Source
const MAX_JOBS = 20

Variables

This section is empty.

Functions

func EnableGzip

func EnableGzip(handler http.Handler) http.Handler

func ServeNow

func ServeNow() (err error)

Types

type Api

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

type Job

type Job struct {
	Params []interface{}
	Run    func([]interface{})
}

type ServerContext

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

type WokerPool

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

func NewWorkPool

func NewWorkPool() *WokerPool

func (*WokerPool) QueueJob

func (wp *WokerPool) QueueJob(job *Job) bool

func (*WokerPool) Start

func (wp *WokerPool) Start()

func (*WokerPool) Stop

func (wp *WokerPool) Stop()

Jump to

Keyboard shortcuts

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