Documentation ¶
Index ¶
- Constants
- type AdaptorUser
- type AdaptorUserGroup
- type AsymmetricKeyCredentials
- type Authentication
- type ChangedFile
- type Client
- type ClusterInfo
- type ClusterNodeType
- type ClusterNodeUsage
- type ClusterNodeUsageRESTParams
- type CommandTemplate
- type CommandTemplateParameterValue
- type DownloadFileRESTParams
- type DownloadPartsOfJobFilesRESTParams
- type EndFileTransferRESTParams
- type EnvironmentVariable
- type FileTransferMethod
- type FileTransferProtocol
- type JobCreateRESTParams
- type JobFileContent
- type JobInfo
- type JobInfoRESTParams
- type JobSpecification
- type JobSubmitRESTParams
- type ListAdaptorUserGroupsRESTParams
- type NodeTypeAggregatedUsage
- type OpenIDAuthentication
- type OpenIDCredentials
- type OpenStackCredentials
- type PasswordCredentials
- type RefreshTokenFunc
- type SubmittedJobInfoUsageReport
- type TaskFileOffset
- type TaskInfo
- type TaskParalizationParameter
- type TaskSpecification
- type TemplateParameter
- type UserResourceUsageRESTParams
- type UserResourceUsageReport
Constants ¶
const (
// LocationUserPropertyName hold the name of user used to connect to HEAppE
LocationUserPropertyName = "user"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdaptorUser ¶
AdaptorUser hold user name and id properties
type AdaptorUserGroup ¶
type AdaptorUserGroup struct { ID int64 `json:"Id"` Name string Description string AccountingString string Users []AdaptorUser }
AdaptorUserGroup holds user properties
type AsymmetricKeyCredentials ¶
AsymmetricKeyCredentials hold credentials used to transfer files to the HPC cluster
type Authentication ¶
type Authentication struct {
Credentials PasswordCredentials
}
Authentication parameters
type ChangedFile ¶
ChangedFile holds properties of a file created/updated by a HEAppeJob
type Client ¶
type Client interface { CreateJob(job JobSpecification) (JobInfo, error) SubmitJob(jobID int64) error CancelJob(jobID int64) error DeleteJob(jobID int64) error GetJobInfo(jobID int64) (JobInfo, error) SetSessionID(sessionID string) GetSessionID() string GetURL() string DownloadPartsOfJobFilesFromCluster(JobID int64, offsets []TaskFileOffset) ([]JobFileContent, error) GetFileTransferMethod(jobID int64) (FileTransferMethod, error) EndFileTransfer(jobID int64, ft FileTransferMethod) error DownloadFileFromCluster(jobID int64, filePath string) (string, error) ListChangedFilesForJob(jobID int64) ([]ChangedFile, error) ListAdaptorUserGroups() ([]AdaptorUserGroup, error) GetUserResourceUsageReport(userID int64, startTime, endTime string) (*UserResourceUsageReport, error) ListAvailableClusters() ([]ClusterInfo, error) GetCurrentClusterNodeUsage(nodeID int64) (ClusterNodeUsage, error) GetOpenStackCredentials() (string, string, error) }
Client is the client interface to HEAppE service
func GetClient ¶
func GetClient(locationProps config.DynamicMap, username, token string, refreshToken RefreshTokenFunc) (Client, error)
GetClient returns a HEAppE client for a given location
type ClusterInfo ¶
type ClusterInfo struct { ID int64 `json:"Id"` Name string Description string NodeTypes []ClusterNodeType }
ClusterInfo holds info on clusters managed by HEAppE
type ClusterNodeType ¶
type ClusterNodeType struct { ID int64 `json:"Id"` Name string Description string NumberOfNodes int CoresPerNode int MaxWalltime int CommandTemplates []CommandTemplate }
ClusterNodeType holds a node description in a job
type ClusterNodeUsage ¶
type ClusterNodeUsage struct { NodeType ClusterNodeType NodesUsed int CoresUsedPerNode []int }
ClusterNodeUsage holds usage details for a given node of a cluster
type ClusterNodeUsageRESTParams ¶
type ClusterNodeUsageRESTParams struct { ClusterNodeID int64 `json:"ClusterNodeId"` SessionCode string }
ClusterNodeUsageRESTParams holds parameters used in the REST API call to get the current usage of a given cluster node
type CommandTemplate ¶
type CommandTemplate struct { ID int64 `json:"Id"` Name string Description string Code string TemplateParameters []TemplateParameter }
CommandTemplate holds a command template description in a job
type CommandTemplateParameterValue ¶
type CommandTemplateParameterValue struct { CommandParameterIdentifier string ParameterValue string }
CommandTemplateParameterValue holds a command template parameter
type DownloadFileRESTParams ¶
type DownloadFileRESTParams struct { SubmittedJobInfoID int64 `json:"SubmittedJobInfoId"` RelativeFilePath string SessionCode string }
DownloadFileRESTParams holds HEAppE parameters for the REST API allowing to download a file
type DownloadPartsOfJobFilesRESTParams ¶
type DownloadPartsOfJobFilesRESTParams struct { SubmittedJobInfoID int64 `json:"SubmittedJobInfoId"` TaskFileOffsets []TaskFileOffset SessionCode string }
DownloadPartsOfJobFilesRESTParams holds HEAppE parameters for the REST API allowing to download parts of files
type EndFileTransferRESTParams ¶
type EndFileTransferRESTParams struct { SubmittedJobInfoID int64 `json:"SubmittedJobInfoId"` UsedTransferMethod FileTransferMethod SessionCode string }
EndFileTransferRESTParams holds parameters used in the REST API call to notify the end of files trasnfer
type EnvironmentVariable ¶
EnvironmentVariable holds an environment variable definition
type FileTransferMethod ¶
type FileTransferMethod struct { ServerHostname string Protocol FileTransferProtocol Credentials AsymmetricKeyCredentials }
FileTransferMethod holds properties allowing to transfer files to the HPC cluster
type FileTransferProtocol ¶
type FileTransferProtocol int
FileTransferProtocol used to transfer files to the HPC cluster
const ( FileTransferProtocol = 1 // SftpScp file transfer protocol SftpScp = 2 )NetworkShare
func (*FileTransferProtocol) UnmarshalJSON ¶
func (p *FileTransferProtocol) UnmarshalJSON(b []byte) error
UnmarshalJSON is used to read a file transfer protocol from a string
type JobCreateRESTParams ¶
type JobCreateRESTParams struct { JobSpecification JobSpecification SessionCode string }
JobCreateRESTParams holds HEAppE REST API job creation parameters
type JobFileContent ¶
type JobFileContent struct { Content string RelativePath string Offset int64 FileType int SubmittedTaskInfoID int64 `json:"SubmittedTaskInfoId"` }
JobFileContent holds the response to a partial download of job files
type JobInfo ¶
type JobInfo struct { ID int64 `json:"Id"` Name string State int Project string CreationTime string SubmitTime string StartTime string EndTime string TotalAllocatedTime float64 Tasks []TaskInfo }
JobInfo holds the response to a job creation/submission
type JobInfoRESTParams ¶
type JobInfoRESTParams struct { SubmittedJobInfoID int64 `json:"SubmittedJobInfoId"` SessionCode string }
JobInfoRESTParams holds HEAppE REST API job info parameters
type JobSpecification ¶
type JobSpecification struct { Name string Project string WaitingLimit int NotificationEmail string PhoneNumber string NotifyOnAbort bool NotifyOnFinish bool NotifyOnStart bool IsExtraLong bool ClusterID int `json:"ClusterId"` FileTransferMethodID int `json:"FileTransferMethodId"` Tasks []TaskSpecification }
JobSpecification holds job properties
type JobSubmitRESTParams ¶
type JobSubmitRESTParams struct { CreatedJobInfoID int64 `json:"CreatedJobInfoId"` SessionCode string }
JobSubmitRESTParams holds HEAppE REST API job submission parameters
type ListAdaptorUserGroupsRESTParams ¶
type ListAdaptorUserGroupsRESTParams struct {
SessionCode string
}
ListAdaptorUserGroupsRESTParams holds parameters used in the REST API call to get details on users
type NodeTypeAggregatedUsage ¶
type NodeTypeAggregatedUsage struct { ClusterNodeType ClusterNodeType SubmittedJobs []SubmittedJobInfoUsageReport TotalCorehoursUsage float64 }
NodeTypeAggregatedUsage hold usage for a cluster node type
type OpenIDAuthentication ¶
type OpenIDAuthentication struct {
Credentials OpenIDCredentials
}
Authentication parameters
type OpenIDCredentials ¶
OpenIDCredentials holds OpenID Connect token and user name to perform a token-based authentication
type OpenStackCredentials ¶ added in v1.0.7
type OpenStackCredentials struct { ApplicationCredentialsId string ApplicationCredentialsSecret string }
OpenStackCredentials holds OpenStack application credentials
type PasswordCredentials ¶
PasswordCredentials holds user/password to perform a basic authentication
type RefreshTokenFunc ¶ added in v1.0.6
RefreshTokenFunc is a type of function provided by the caller to refresh a token when needed
type SubmittedJobInfoUsageReport ¶
type SubmittedJobInfoUsageReport struct { ID int64 `json:"Id"` Name string State int Project string CommandTemplateID int64 `json:"CommandTemplateId"` CreationTime string SubmitTime string StartTime string EndTime string TotalAllocatedTime float64 TotalCorehoursUsage float64 }
SubmittedJobInfoUsageReport holds the description of resources used for a job
type TaskFileOffset ¶
type TaskFileOffset struct { SubmittedTaskInfoID int64 `json:"SubmittedTaskInfoId"` FileType int Offset int64 }
TaskFileOffset holds the offset to a file of a given task
type TaskInfo ¶
type TaskInfo struct { ID int64 `json:"Id"` Name string State int Priority int AllocatedTime float64 AllocatedCoreIds []string StartTime string EndTime string NodeType ClusterNodeType ErrorMessage string CpuHyperThreading bool }
TaskInfo holds a task description in a job
type TaskParalizationParameter ¶
TaskParalizationParameter holds paramters of tasks parallelization
type TaskSpecification ¶
type TaskSpecification struct { Name string MinCores int MaxCores int WalltimeLimit int RequiredNodes []string `json:"RequiredNodes,omitempty"` Priority int JobArrays string IsExclusive bool IsRerunnable bool CpuHyperThreading bool StandardInputFile string StandardOutputFile string StandardErrorFile string ProgressFile string LogFile string ClusterTaskSubdirectory string ClusterNodeTypeID int `json:"ClusterNodeTypeId"` CommandTemplateID int `json:"CommandTemplateId"` TaskParalizationParameters []TaskParalizationParameter `json:"TaskParalizationParameters,omitempty"` EnvironmentVariables []EnvironmentVariable `json:"EnvironmentVariables,omitempty"` // TODO: DependsOn TemplateParameterValues []CommandTemplateParameterValue `json:"TemplateParameterValues,omitempty"` }
TaskSpecification holds task properties
type TemplateParameter ¶
TemplateParameter holds template parameters description in a job
type UserResourceUsageRESTParams ¶
type UserResourceUsageRESTParams struct { UserID int64 `json:"UserId"` StartTime string EndTime string SessionCode string }
UserResourceUsageRESTParams holds parameters used in the REST API call to get resources usage report for a user
type UserResourceUsageReport ¶
type UserResourceUsageReport struct { User AdaptorUser NodeTypeReports []NodeTypeAggregatedUsage StartTime string EndTime string TotalCorehoursUsage float64 }
UserResourceUsageReport holds a report of resources by a user for a given time frame