job

package
v0.0.0-...-162f8c7 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2018 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(cfg *config.Config)

Types

type Controller

type Controller struct {
	*pi.Pi
	// contains filtered or unexported fields
}

func NewController

func NewController(pi *pi.Pi, hostname string) *Controller

func (*Controller) ExtractJobs

func (c *Controller) ExtractJobs()

func (*Controller) GetJobLength

func (c *Controller) GetJobLength() uint32

func (*Controller) HandleJob

func (c *Controller) HandleJob(jobId string, cb func()) error

func (*Controller) HandleJobs

func (c *Controller) HandleJobs()

func (*Controller) IsRunningExceed

func (c *Controller) IsRunningExceed() bool

func (*Controller) Serve

func (c *Controller) Serve()

type Processor

type Processor struct {
	Job *models.Job
}

func NewProcessor

func NewProcessor(job *models.Job) *Processor

func (*Processor) Post

func (j *Processor) Post()

Post process when job is done

type Server

type Server struct {
	*pi.Pi
	// contains filtered or unexported fields
}

func (*Server) CreateJob

func (p *Server) CreateJob(ctx context.Context, req *pb.CreateJobRequest) (*pb.CreateJobResponse, error)

func (*Server) DescribeJobs

func (p *Server) DescribeJobs(ctx context.Context, req *pb.DescribeJobsRequest) (*pb.DescribeJobsResponse, error)

Jump to

Keyboard shortcuts

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