job_manager

package
v0.0.0-...-db53517 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MulanPSL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JobMap = map[string]Job{}

Functions

func RegisterJob

func RegisterJob(job Job)

Types

type Job

type Job interface {
	JobName() string
	Exec() error
}

type JobCephStatus

type JobCephStatus struct {
	JobCephStatusCaller
}

func NewJobCephStatus

func NewJobCephStatus(caller JobCephStatusCaller) JobCephStatus

func (*JobCephStatus) Exec

func (job *JobCephStatus) Exec() error

func (*JobCephStatus) JobName

func (job *JobCephStatus) JobName() string

type JobCephStatusCaller

type JobCephStatusCaller interface {
	interfacer.Worker
	RunTime() int64
	HandleCephStatusList(list ceph_cluster.CephStatusList)
}

type JobFio

type JobFio struct {
	fio.Fio
	interfacer.Worker
}

func (*JobFio) Exec

func (job *JobFio) Exec() (interface{}, error)

func (*JobFio) JobName

func (job *JobFio) JobName() string

type JobJobCost

type JobJobCost struct {
	RunTime int64   `json:"runtime"`
	OsdIDs  []int64 `json:"osdIDs"`
	interfacer.Worker
}

func (*JobJobCost) Exec

func (job *JobJobCost) Exec() (interface{}, error)

func (*JobJobCost) JobName

func (job *JobJobCost) JobName() string

type JobManager

type JobManager struct {
	*ceph_cluster.CephCluster
	*ceph.CephConf
	PipeLine PipeLine `json:"pipeLine"`
}

func NewJobManager

func NewJobManager(configPath string) (*JobManager, error)

func (*JobManager) ReadConfig

func (execConfig *JobManager) ReadConfig(configFilePath string) error

func (*JobManager) Run

func (execConfig *JobManager) Run() (interface{}, error)

type JobSleep

type JobSleep struct {
	Time int64 `json:"time"`
}

func (*JobSleep) Exec

func (job *JobSleep) Exec() (interface{}, error)

func (*JobSleep) JobName

func (job *JobSleep) JobName() string

type PipeLine

type PipeLine struct {
	Job
	// 并行job
	ParallelJobs []PipeLine `json:"parallelJobs"`
	// 串行job
	SerialJobs []PipeLine `json:"serialJobs"`
}

func NewJobFioPipeLine

func NewJobFioPipeLine(worker interfacer.Worker, fio fio.Fio) *PipeLine

func NewJobJobCostPipeLine

func NewJobJobCostPipeLine(worker interfacer.Worker, runtime int64) *PipeLine

func (*PipeLine) Run

func (pipeLine *PipeLine) Run() (interface{}, error)

func (*PipeLine) RunParallelJobs

func (pipeLine *PipeLine) RunParallelJobs() (interface{}, error)

func (*PipeLine) RunSerialJobs

func (pipeLine *PipeLine) RunSerialJobs() (interface{}, error)

Jump to

Keyboard shortcuts

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