Documentation
¶
Index ¶
- type GridSdr
- func (gs *GridSdr) AddJobs(jobs *[]Job, reply *int) error
- func (gs *GridSdr) AddJobsViaUser(jobs *[]Job, reply *int) error
- func (gs *GridSdr) DropJobs(n *int, reply *int) error
- func (gs *GridSdr) GetState(x *int, state *GridSdrState) error
- func (gs *GridSdr) RecvMsg(args *RPCArgs, reply *int) error
- func (gs *GridSdr) RecvScheduledJobs(jobs *[]Job, reply *int) error
- func (gs *GridSdr) RecvScheduledJobsFromRM(jobs *[]Job, reply *int) error
- func (gs *GridSdr) RemoveCompletedJobs(jobs *[]int64, reply *int) error
- func (gs *GridSdr) Run()
- func (gs *GridSdr) SyncCompletedJobs(jobs *[]int64, reply *int) error
- type GridSdrState
- type Job
- type RPCArgs
- type ResMan
- type WorkerDone
- type WorkerTask
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GridSdr ¶
GridSdr describes the properties of one grid scheduler
func InitGridSdr ¶
InitGridSdr creates a grid scheduler.
func (*GridSdr) AddJobs ¶
AddJobs appends new jobs into the jobs queue. NOTE: this function should not be called directly by the client, it requires CS.
func (*GridSdr) AddJobsViaUser ¶
AddJobsViaUser is called by the client to add job(s) to the tasks queue, it returns when the job is synchronised.
func (*GridSdr) GetState ¶
func (gs *GridSdr) GetState(x *int, state *GridSdrState) error
GetState RPC used by a GS when it first starts up to copy the job lists TODO some repeated code in this function
func (*GridSdr) RecvMsg ¶
RecvMsg is called remotely, it updates the Lamport clock first and then performs tasks depending on the message type. Note that this RPC call works when the GS is not ready.
func (*GridSdr) RecvScheduledJobs ¶
RecvScheduledJobs RPC is for appending jobs to the scheduledJobs list NOTE: this function should not be called directly by the client, it requires CS.
func (*GridSdr) RecvScheduledJobsFromRM ¶
RecvScheduledJobsFromRM RPC is for appending jobs to the scheduledJobs list but called by the RM it needs to use the CS to sync the new jobs with the GS cluster
func (*GridSdr) RemoveCompletedJobs ¶
RemoveCompletedJobs is called by another GS to remove job(s) from the scheduledJobAddChan
type GridSdrState ¶
GridSdrState is an RPC argument for synchronising states when GS first start up
type Job ¶
type Job struct {
ID int64 // must be unique
Duration time.Duration
ResMan string
StartTime time.Time
FinishTime time.Time
}
Job are entities can be executed by worker nodes
type RPCArgs ¶
RPCArgs is the arguments for RPC calls between grid schedulers and/or resource maanagers
type ResMan ¶
ResMan the resource manager
func InitResMan ¶
InitResMan initialises and returns a ResMan
func (*ResMan) AddJobsViaUser ¶
AddJobsViaUser PRC, only used by CLI
type WorkerDone ¶
type WorkerDone struct {
// contains filtered or unexported fields
}
WorkerDone is indicating when a job is done, it's used in channels
type WorkerTask ¶
type WorkerTask struct {
// contains filtered or unexported fields
}
WorkerTask represents a job/task that can be executed by a worker node every Job (initially from the user) gets converted into a WorkerTask