Documentation ¶
Index ¶
- Variables
- func ParseDuration(duration string) (*time.Duration, error)
- type Client
- func (*Client) Open(path string) (io.ReadCloser, error)
- func (*Client) Partitions() ([]string, error)
- func (*Client) Resources(partition string) (*Resources, error)
- func (*Client) SBatch(script, partition string) (int64, error)
- func (*Client) SCancel(jobID int64) error
- func (*Client) SJobInfo(jobID int64) ([]*JobInfo, error)
- func (*Client) SJobSteps(jobID int64) ([]*JobStepInfo, error)
- func (*Client) Tail(path string) (io.ReadCloser, error)
- type Feature
- type JobInfo
- type JobStepInfo
- type Resources
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrDurationIsUnlimited means that duration field has value UNLIMITED ErrDurationIsUnlimited = errors.New("duration is unlimited") // ErrInvalidSacctResponse is returned when trying to parse sacct // response that is invalid. ErrInvalidSacctResponse = errors.New("unable to parse sacct response") // ErrFileNotFound is returned when Open fails to find a file. ErrFileNotFound = errors.New("file is not found") )
Functions ¶
Types ¶
type Client ¶
type Client struct{}
Client implements Slurm interface for communicating with a local Slurm cluster by calling Slurm binaries directly.
func (*Client) Open ¶
func (*Client) Open(path string) (io.ReadCloser, error)
Open opens arbitrary file at path in a read-only mode.
func (*Client) Partitions ¶
Partitions returns a list of partition names.
type JobInfo ¶
type JobInfo struct { ID string `json:"id" slurm:"JobId"` UserID string `json:"user_id" slurm:"UserId"` ArrayJobID string `json:"array_job_id" slurm:"ArrayJobId"` Name string `json:"name" slurm:"JobName"` ExitCode string `json:"exit_code" slurm:"ExitCode"` State string `json:"state" slurm:"JobState"` SubmitTime *time.Time `json:"submit_time" slurm:"SubmitTime"` StartTime *time.Time `json:"start_time" slurm:"StartTime"` RunTime *time.Duration `json:"run_time" slurm:"RunTime"` TimeLimit *time.Duration `json:"time_limit" slurm:"TimeLimit"` WorkDir string `json:"work_dir" slurm:"WorkDir"` StdOut string `json:"std_out" slurm:"StdOut"` StdErr string `json:"std_err" slurm:"StdErr"` Partition string `json:"partition" slurm:"Partition"` NodeList string `json:"node_list" slurm:"NodeList"` BatchHost string `json:"batch_host" slurm:"BatchHost"` NumNodes string `json:"num_nodes" slurm:"NumNodes"` }
JobInfo contains information about a Slurm job.
type JobStepInfo ¶
type JobStepInfo struct { ID string `json:"id"` Name string `json:"name"` StartedAt *time.Time `json:"started_at"` FinishedAt *time.Time `json:"finished_at"` ExitCode int `json:"exit_code"` State string `json:"state"` }
JobStepInfo contains information about a single Slurm job step.
Click to show internal directories.
Click to hide internal directories.