job

package
v0.0.0-...-c3a0a5d Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

func NewController

func NewController(input <-chan *Job, jobsFilePath string) (*Controller, <-chan Status)

func (*Controller) Handle

func (c *Controller) Handle(w http.ResponseWriter, r *http.Request)

type Job

type Job struct {
	Name        string
	Status      Status
	LastUpdated time.Time
}

func NewJob

func NewJob(name string, status Status, lastUpdated time.Time) *Job

func (Job) String

func (job Job) String() string

type Status

type Status int

The build status of a job.

const (
	Failure  Status = iota // Job couldn't be compiled or another unrecoverable error occurred.
	Unstable               // At least one test for this job failed.
	Success                // Job compiled and all tests are green.
)

func Parse

func Parse(status string) (Status, error)

func (Status) MarshalJSON

func (s Status) MarshalJSON() ([]byte, error)

func (Status) String

func (s Status) String() string

func (*Status) UnmarshalJSON

func (s *Status) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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