Documentation ¶
Overview ¶
Dynamic Allocator Module (DAM) structures
Index ¶
Constants ¶
const (
// RequestStatusOK is the stauts of a successful request
RequestStatusOK = "ok"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // SubmitCloudPlacementRequest submits a request to find the best placement for cloud compute instances SubmitCloudPlacementRequest(token string, requirement CloudRequirement) (SubmittedRequestInfo, error) // SubmitHPCPlacementRequest submits a request to find the best placement for HPC HEAppE jobs SubmitHPCPlacementRequest(token string, requirement HPCRequirement) (SubmittedRequestInfo, error) // GetCloudPlacementRequestStatus returns the status of a request to find the best cloud placement GetCloudPlacementRequestStatus(token string, requestID string) (CloudPlacement, error) // GetHPCPlacementRequestStatus returns the status of a request to find the best HPC placement GetHPCPlacementRequestStatus(token string, requestID string) (HPCPlacement, error) }
Client is the client interface to the Dynamic Allocator Module (DAM) service
func GetClient ¶
func GetClient(locationProps config.DynamicMap, refreshTokenFunc RefreshTokenFunc) (Client, error)
GetClient returns a DAM client for a given location
type CloudLocation ¶
type CloudLocation struct { Flavor string `json:"flavour"` ImageID string `json:"image_id"` FloatingIPPool string `json:"NetworkIP"` PrivateNetwork string `json:"PrivateNetwork,omitempty"` Location string `json:"location"` StorageInputLocations []string `json:"storage_inputs"` HEAppEURL string `json:"HEAppE_URL,omitempty"` OpenStackURL string `json:"OpenStack_URL,omitempty"` ProjectName string `json:"project,omitempty"` }
CloudLocation holds properties of a selected Cloud location
type CloudPlacement ¶
type CloudPlacement struct { Status string `json:"status"` Message []CloudLocation `json:"message"` }
type CloudRequirement ¶
type CloudRequirement struct { NumberOfLocations int `json:"number"` NumberOfInstances int `json:"inst"` Project string `json:"project"` OSVersion string `json:"os_version"` MaxWallTime int `json:"max_walltime"` CPUs int `json:"vCPU"` Memory int `json:"mem"` Disk int `json:"disk"` StorageInputs []StorageInput `json:"storage_inputs"` Attempt int `json:"attempt"` PreviousRequestID string `json:"original_request_id"` }
CloudRequirement holds parameters of requirements for Cloud instances to allocate
type HPCLocation ¶
type HPCLocation struct { URL string `json:"HEAppE_URL"` ClusterID int `json:"cluster_id"` Location string `json:"location"` Project string `json:"project"` StorageInputLocations []string `json:"storage_inputs"` TaskLocations []TaskLocation `json:"tasks"` }
HPCLocation holds properties of a selected HPC location
type HPCPlacement ¶
type HPCPlacement struct { Status string `json:"status"` Message []HPCLocation `json:"message"` }
type HPCRequirement ¶
type HPCRequirement struct { Number int `json:"number"` Project string `json:"project"` MaxWallTime int `json:"max_walltime"` MaxCores int `json:"max_cores"` TaskName string `json:"taskName"` StorageInputs []StorageInput `json:"storage_inputs"` Attempt int `json:"attempt"` PreviousRequestID string `json:"original_request_id"` }
HPCRequirement holds parameters of requirements for HPC jobs to create
type RefreshTokenFunc ¶
RefreshTokenFunc is a type of function provided by the caller to refresh a token when needed
type StorageInput ¶
type StorageInput struct { Size int `json:"size"` Locations []string `json:"locations"` NumberOfFiles int `json:"numberOfFiles"` }
StorageInput holds properties of storage inputs that will be used be transferred to the Cloud instance or HEApPE Job
type SubmittedRequestInfo ¶
type SubmittedRequestInfo struct { Message string `json:"message,omitempty"` Status string `json:"status"` RequestID string `json:"uid"` }
SubmittedRequestInfo holds the result of a request submission
type TaskLocation ¶
type TaskLocation struct { ClusterNodeTypeID int `json:"cluster_node_type_id"` CommandTemplateID int `json:"command_template_id"` TaskName string `json:"name"` }
TaskLocation holds properties of a selected HPC infrastructure for a HEAppE task