Documentation
¶
Index ¶
- func ApplyBatchJobConfigRequest(dst *model.BatchJobConfig, src *BatchJobConfigRequest)
- func ToInputEntities(in []TemplateInputDTO) []model.TemplateInput
- func ToOutputEntities(in []TemplateOutputDTO) []model.TemplateOutput
- type BatchDeploymentRequest
- type BatchDeploymentResponse
- type BatchJobConfigRequest
- type BatchJobConfigResponse
- type TemplateInputDTO
- type TemplateOutputDTO
- type TemplateRequest
- type TemplateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyBatchJobConfigRequest ¶
func ApplyBatchJobConfigRequest(dst *model.BatchJobConfig, src *BatchJobConfigRequest)
ApplyBatchJobConfigRequest copies a request onto a config entity, preserving the entity's id so an update mutates the existing row instead of orphaning it.
func ToInputEntities ¶
func ToInputEntities(in []TemplateInputDTO) []model.TemplateInput
func ToOutputEntities ¶
func ToOutputEntities(in []TemplateOutputDTO) []model.TemplateOutput
Types ¶
type BatchDeploymentRequest ¶
type BatchDeploymentRequest struct {
TemplateID string `json:"templateId"`
SlurmClusterID *string `json:"slurmClusterId"`
SlurmRunSection string `json:"slurmRunSection"`
// The resource request and partition a run of this deployment starts from. A run
// carries its own copy and may depart from both, so these are defaults rather than
// what any particular job is submitted with.
DefaultBatchJobConfig *BatchJobConfigRequest `json:"defaultBatchJobConfig"`
DefaultPartition *string `json:"defaultPartition"`
}
BatchDeploymentRequest is the create/update payload for a deployment.
Java: org.apache.airavata.application.dto.deployment.BatchApplicationDeploymentRequestDto
func (*BatchDeploymentRequest) Validate ¶
func (r *BatchDeploymentRequest) Validate() []httpx.FieldError
Validate implements httpx.Validator.
type BatchDeploymentResponse ¶
type BatchDeploymentResponse struct {
DeploymentID string `json:"deploymentId"`
TemplateID *string `json:"templateId"`
SlurmClusterID *string `json:"slurmClusterId"`
SlurmRunSection string `json:"slurmRunSection"`
DefaultBatchJobConfig *BatchJobConfigResponse `json:"defaultBatchJobConfig"`
DefaultPartition *string `json:"defaultPartition"`
}
BatchDeploymentResponse is the read model for a deployment.
Java: org.apache.airavata.application.dto.deployment.BatchApplicationDeploymentResponseDto
func ToBatchDeploymentResponse ¶
func ToBatchDeploymentResponse(d *model.BatchDeployment) BatchDeploymentResponse
type BatchJobConfigRequest ¶
type BatchJobConfigRequest struct {
WallTimeMinutes *int64 `json:"wallTimeMinutes"`
Allocation string `json:"allocation"`
CPUs *int32 `json:"cpus"`
Mem *string `json:"mem"`
MemPerCPU *string `json:"memPerCpu"`
NtasksPerNode *int32 `json:"ntasksPerNode"`
CPUsPerTask *int32 `json:"cpusPerTask"`
Nodes *int32 `json:"nodes"`
Ntasks *int32 `json:"ntasks"`
Gres *string `json:"gres"`
GPUs *int32 `json:"gpus"`
MemPerGPU *string `json:"memPerGpu"`
CPUsPerGPU *string `json:"cpusPerGpu"`
GPUsPerNode *int32 `json:"gpusPerNode"`
Constraints *string `json:"constraints"`
QOS *string `json:"qos"`
}
BatchJobConfigRequest is the resource request carried by a deployment or process.
Java: org.apache.airavata.application.dto.deployment.BatchJobConfigRequestDto
func (*BatchJobConfigRequest) Validate ¶
func (r *BatchJobConfigRequest) Validate() []httpx.FieldError
Validate implements httpx.Validator.
type BatchJobConfigResponse ¶
type BatchJobConfigResponse struct {
BatchJobConfigID string `json:"batchJobConfigId"`
WallTimeMinutes int64 `json:"wallTimeMinutes"`
Allocation string `json:"allocation"`
CPUs *int32 `json:"cpus"`
Mem *string `json:"mem"`
MemPerCPU *string `json:"memPerCpu"`
NtasksPerNode *int32 `json:"ntasksPerNode"`
CPUsPerTask *int32 `json:"cpusPerTask"`
Nodes *int32 `json:"nodes"`
Ntasks *int32 `json:"ntasks"`
Gres *string `json:"gres"`
GPUs *int32 `json:"gpus"`
MemPerGPU *string `json:"memPerGpu"`
CPUsPerGPU *string `json:"cpusPerGpu"`
GPUsPerNode *int32 `json:"gpusPerNode"`
Constraints *string `json:"constraints"`
QOS *string `json:"qos"`
}
BatchJobConfigResponse is the read model for a resource request.
Java: org.apache.airavata.application.dto.deployment.BatchJobConfigResponseDto
func ToBatchJobConfigResponse ¶
func ToBatchJobConfigResponse(c *model.BatchJobConfig) *BatchJobConfigResponse
ToBatchJobConfigResponse renders a config entity.
type TemplateInputDTO ¶
type TemplateInputDTO struct {
InputID string `json:"inputId"`
InputName string `json:"inputName"`
DisplayName *string `json:"displayName"`
InputDescription *string `json:"inputDescription"`
InputType *model.TemplateInputType `json:"inputType"`
// Required is "required" on the wire, not "isRequired" — the Java DTO field is
// named required even though the entity column is is_required.
Required bool `json:"required"`
DefaultValue *string `json:"defaultValue"`
}
TemplateInputDTO is one declared input, used for both reads and writes.
InputID is echoed back on reads but ignored on writes: an update replaces the declaration set wholesale, so child ids are regenerated rather than matched.
Java: org.apache.airavata.application.dto.template.ApplicationTemplateInputDto
func (*TemplateInputDTO) Validate ¶
func (d *TemplateInputDTO) Validate() []httpx.FieldError
Validate implements httpx.Validator.
type TemplateOutputDTO ¶
type TemplateOutputDTO struct {
OutputID string `json:"outputId"`
OutputName string `json:"outputName"`
DisplayName *string `json:"displayName"`
OutputDescription *string `json:"outputDescription"`
OutputType *model.TemplateOutputType `json:"outputType"`
}
TemplateOutputDTO is one declared output, used for both reads and writes.
Java: org.apache.airavata.application.dto.template.ApplicationTemplateOutputDto
func (*TemplateOutputDTO) Validate ¶
func (d *TemplateOutputDTO) Validate() []httpx.FieldError
Validate implements httpx.Validator.
type TemplateRequest ¶
type TemplateRequest struct {
TemplateName string `json:"templateName"`
TemplateDescription *string `json:"templateDescription"`
Inputs []TemplateInputDTO `json:"inputs"`
Outputs []TemplateOutputDTO `json:"outputs"`
}
TemplateRequest is the create/update payload for a template.
Java: org.apache.airavata.application.dto.template.ApplicationTemplateRequestDto
func (*TemplateRequest) Validate ¶
func (r *TemplateRequest) Validate() []httpx.FieldError
Validate implements httpx.Validator.
Duplicate input names are caught here rather than being left to the unique constraint. The database would reject them too, but as an opaque driver error that surfaces as a 500 — a caller's mistake reported as a server fault.
type TemplateResponse ¶
type TemplateResponse struct {
TemplateID string `json:"templateId"`
TemplateName *string `json:"templateName"`
TemplateDescription *string `json:"templateDescription"`
Inputs []TemplateInputDTO `json:"inputs"`
Outputs []TemplateOutputDTO `json:"outputs"`
}
TemplateResponse is the read model for a template.
Java: org.apache.airavata.application.dto.template.ApplicationTemplateResponseDto
func ToTemplateResponse ¶
func ToTemplateResponse(t *model.Template) TemplateResponse