job

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: Apache-2.0 Imports: 24 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
	JLogger *logger.Logger
}

func NewProcessor

func NewProcessor(job *models.Job, jLogger *logger.Logger) *Processor

func (*Processor) Final

func (p *Processor) Final()

func (*Processor) Post

func (p *Processor) Post() error

Post process when job is done

func (*Processor) Pre

func (p *Processor) Pre() error

Pre process when job is start

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