Documentation ¶
Index ¶
- Constants
- func CreateJob(ctx context.Context, token string, input JobInput) (*string, error)
- func Delete(ctx context.Context, token, jobID string) error
- func EnableCache(enabled bool)
- func SetEndpoint(endpoint string)
- func Stop(ctx context.Context, token, jobID string) error
- func Submit(ctx context.Context, token, jobID string) error
- type Application
- type ApplicationLicense
- type ApplicationVersion
- type Checksum
- type CoreType
- type File
- type Files
- type Job
- type JobAnalyse
- type JobCoreType
- type JobHardware
- type JobInput
- type JobInputAnalyse
- type JobInputFile
- type JobStatus
- type JobStatusValue
- type JobStatuses
- type Log
- type UploadedFile
- type UploadedFileStorage
Constants ¶
const (
ApplicationSingularity = "user_included_singularity_container"
)
Application codes
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Application ¶
type Application struct { Code string `json:"code"` Versions []ApplicationVersion `json:"versions"` HasRescaleLicense bool `json:"hasRescaleLicense"` HasOnDemandLicense bool `json:"hasOnDemandLicense"` HasShortTermLicense bool `json:"hasShortTermLicense"` LicenseSettings []ApplicationLicense `json:"licenseSettings"` }
Application represents Rescale supported application
type ApplicationLicense ¶
type ApplicationLicense struct { Name string `json:"name"` Required bool `json:"required"` LicenseType string `json:"licenseType"` Label string `json:"label"` IsServer bool `json:"isServer"` CanCheckAvailability bool `json:"canCheckAvailability"` }
ApplicationLicense represents license settings of an application
type ApplicationVersion ¶
type ApplicationVersion struct { ID string `json:"id"` Version string `json:"version"` VersionCode string `json:"versionCode"` Type string `json:"type"` OS []string `json:"oses"` CoreTypes []string `json:"allowedCoreTypes"` MustBeRequested bool `json:"mustBeRequested"` }
ApplicationVersion represents a version of an application
type CoreType ¶
type CoreType struct { Code string `json:"code"` Name string `json:"name"` IsDefault bool `json:"isDefault"` MustBeRequested bool `json:"mustBeRequested"` ProcessorInfo string `json:"processorInfo"` Cores []int `json:"cores"` GPUCounts []int `json:"gpuCounts"` Compute *string `json:"compute"` BaseClockSpeed *string `json:"baseClockSpeed"` IO string `json:"io"` Storage int `json:"storage"` Memory int `json:"memory"` DisplayOrder int `json:"displayOrder"` }
CoreType represents Rescale Compute environments
type File ¶
type File struct { ID string `json:"id"` Name string `json:"name"` Path string `json:"path"` TypeID int64 `json:"typeId"` Size int64 `json:"decryptedSize"` Checksums []*Checksum `json:"fileChecksums"` UploadedAt *time.Time `json:"dateUploaded"` DownloadURL string `json:"downloadUrl"` Owner string `json:"owner"` }
File defines the file information
type Job ¶
type Job struct { ID string `json:"id"` Name string `json:"name"` JobAnalyses []JobInputAnalyse `json:"jobanalyses"` JobVariables []string `json:"jobvariables"` IsLowPriority bool `json:"isLowPriority"` IsTemplateDryRun bool `json:"isTemplateDryRun"` }
Job defines the fields of a Rescale job
type JobAnalyse ¶
JobAnalyse defines Rescale job software
type JobCoreType ¶
type JobCoreType struct {
Code string `json:"code"`
}
JobCoreType defines Rescale job core type
type JobHardware ¶
type JobHardware struct { Type string `json:"type"` CoreType JobCoreType `json:"coreType"` Slots int `json:"slots"` CoresPerSlot int `json:"coresPerSlot"` WallTime int `json:"walltime"` }
JobHardware defines Rescale job hardware
type JobInput ¶
type JobInput struct { Name string `json:"name"` JobAnalyses []JobInputAnalyse `json:"jobanalyses"` JobVariables []string `json:"jobvariables"` IsLowPriority bool `json:"isLowPriority"` IsTemplateDryRun bool `json:"isTemplateDryRun"` }
JobInput defines Rescale job conditions
type JobInputAnalyse ¶
type JobInputAnalyse struct { Command string `json:"command"` InputFiles []JobInputFile `json:"inputFiles"` Analysis JobAnalyse `json:"analysis"` Hardware JobHardware `json:"hardware"` }
JobInputAnalyse defines Rescale job infrastructure
type JobInputFile ¶
JobInputFile defines files to be used in the job
type JobStatus ¶
type JobStatus struct { ID string `json:"id"` JobID string `json:"jobId"` Status JobStatusValue `json:"status"` StatusReason *string `json:"statusReason"` StatusDate *time.Time `json:"statusDate"` }
JobStatus defines the status of a Rescale job
type JobStatusValue ¶
type JobStatusValue string
JobStatusValue represent job status
const ( JobStatusUnknown JobStatusValue = "Unknown" JobStatusPending JobStatusValue = "Pending" JobStatusQueued JobStatusValue = "Queued" JobStatusStarted JobStatusValue = "Started" JobStatusValidated JobStatusValue = "Validated" JobStatusExecuting JobStatusValue = "Executing" JobStatusCompleted JobStatusValue = "Completed" JobStatusStopping JobStatusValue = "Stopping" JobStatusWait4Cls JobStatusValue = "Waiting for Cluster" JobStatusForceStop JobStatusValue = "Force Stop" JobStatusWaitQueue JobStatusValue = "Waiting for Queue" )
type JobStatuses ¶
JobStatuses defines the status of a Rescale job
func (*JobStatuses) Sort ¶
func (job *JobStatuses) Sort()
type UploadedFile ¶
type UploadedFile struct { ID string `json:"id"` Name string `json:"name"` FilePath string `json:"path"` DownloadURL string `json:"downloadUrl"` MD5 string `json:"md5"` Owner string `json:"owner"` Storage UploadedFileStorage `json:"storage"` }
UploadedFile represents an uploaded file
type UploadedFileStorage ¶
type UploadedFileStorage struct {
ID string `json:"id"`
}
UploadedFileStorage represents a storage which contains the uploaded file