jobserver

package
v0.0.0-...-41f210e Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobServer

type JobServer struct {
	// port to serve on
	ServerPort string
	// host to interact with redis on
	StoreHost string
	// jobstore for the interfacing with redis
	Store *jobstore.JobStore
	// router for setting the API routes
	Router *mux.Router
}

func New

func New(port string, host string) (*JobServer, error)

func (*JobServer) ReadJobHandler

func (js *JobServer) ReadJobHandler(w http.ResponseWriter, r *http.Request)

allows for reading the current state of job

func (*JobServer) RegisterJobHandler

func (js *JobServer) RegisterJobHandler(w http.ResponseWriter, r *http.Request)

allows for adding a new job

func (*JobServer) UpdateJobHandler

func (js *JobServer) UpdateJobHandler(w http.ResponseWriter, r *http.Request)

allows for stopping / resuming / killing a job

Jump to

Keyboard shortcuts

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