api

package
v1.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Slurm

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

Slurm implements WorkloadManagerServer

func NewSlurmAPI

func NewSlurmAPI(c *slurm.Client) *Slurm

NewSlurmAPI creates a new instance of Slurm

func (*Slurm) CancelJob

func (a *Slurm) CancelJob(ctx context.Context, r *api.CancelJobRequest) (*api.CancelJobResponse, error)

CancelJob cancels job

func (*Slurm) JobInfo

func (a *Slurm) JobInfo(ctx context.Context, r *api.JobInfoRequest) (*api.JobInfoResponse, error)

JobInfo returns information about a job from 'scontrol show jobid' Safe to call before job finished. After it could return an error

func (*Slurm) JobSteps

func (a *Slurm) JobSteps(ctx context.Context, r *api.JobStepsRequest) (*api.JobStepsResponse, error)

JobSteps returns information about job steps from 'sacct' Safe to call after job started. Before it could return an error

func (*Slurm) OpenFile

OpenFile opens requested file and return chunks with bytes

func (*Slurm) SubmitJob

func (a *Slurm) SubmitJob(ctx context.Context, r *api.SubmitJobRequest) (*api.SubmitJobResponse, error)

SubmitJob submits job and returns id of it in case of success

func (*Slurm) TailFile

TailFile tails a file till close requested To start receiving file bytes client should send a request with file path and action start, to stop client should send a request with action readToEndAndClose (file path is not required)

and after reaching end method will send EOF error

Jump to

Keyboard shortcuts

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