jobs

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcceptedResponse

func AcceptedResponse(w http.ResponseWriter, job *Job) error

func RegisterRouterJobs

func RegisterRouterJobs(router *mux.Router)

func RemoveJob

func RemoveJob(id uint64)

func RemoveResult

func RemoveResult(id uint64)

Types

type Job

type Job struct {
	ResultChannel chan Result
	Id            uint64
}

func CreateJob

func CreateJob(acquireFunc func() (interface{}, error)) *Job

func NewJob

func NewJob() *Job

type Jobs

type Jobs struct {
	Mutex *sync.Mutex
	// contains filtered or unexported fields
}

func New

func New() *Jobs

type Result

type Result struct {
	Output interface{}
	Err    error
}

Jump to

Keyboard shortcuts

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