job

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2019 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckJobPermission added in v0.2.3

func CheckJobPermission(ctx context.Context, resourceId string) (*models.Job, error)

func CheckJobsPermission added in v0.2.3

func CheckJobsPermission(ctx context.Context, resourceIds []string) ([]*models.Job, error)

func Serve

func Serve(cfg *config.Config)

Types

type Controller

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

func NewController

func NewController(hostname string) *Controller

func (*Controller) ExtractJobs

func (c *Controller) ExtractJobs(ctx context.Context)

func (*Controller) GetJobLength

func (c *Controller) GetJobLength() int32

func (*Controller) HandleJob

func (c *Controller) HandleJob(ctx context.Context, jobId string, cb func()) error

func (*Controller) HandleJobs

func (c *Controller) HandleJobs(ctx context.Context)

func (*Controller) IsRunningExceed

func (c *Controller) IsRunningExceed() bool

func (*Controller) Serve

func (c *Controller) Serve(ctx context.Context)

func (*Controller) UpdateWorkingJobs added in v0.2.3

func (c *Controller) UpdateWorkingJobs(ctx context.Context) error

type Processor

type Processor struct {
	Job *models.Job
}

func NewProcessor

func NewProcessor(job *models.Job) *Processor

func (*Processor) Final

func (p *Processor) Final(ctx context.Context)

func (*Processor) Post

func (p *Processor) Post(ctx context.Context) error

Post process when job is done

func (*Processor) Pre

func (p *Processor) Pre(ctx context.Context) error

Pre process when job is start

func (*Processor) UpdateClusterDetails added in v0.4.0

func (p *Processor) UpdateClusterDetails(ctx context.Context) error

type Server

type Server struct {
	// 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