Documentation
¶
Overview ¶
Package controller serves the process routes: the process itself, its status history and its tasks.
There are no routes for a batch process. What a BATCH_JOB run needs is configured in the batchProcess section of a process body and read back nested in the process response, so every operation on it goes through the process it belongs to.
Index ¶
- type LaunchController
- type LinkController
- type ProcessController
- type StatusController
- type TaskController
- func NewDataStagingTaskController(svc *service.DataStagingTaskService) ...
- func NewInteractiveCommandTaskController(svc *service.InteractiveCommandTaskService) ...
- func NewJobMonitoringTaskController(svc *service.JobMonitoringTaskService) ...
- func NewJobSubmissionTaskController(svc *service.JobSubmissionTaskService) ...
- type TaskStatusController
- type WorkflowController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LaunchController ¶
type LaunchController struct {
// contains filtered or unexported fields
}
LaunchController serves the launch action on /api/v1/processes/{processId}.
Launching is a verb rather than a resource: it has no body, nothing is addressable afterwards under /launch, and what it produces is read back through the process's task collections. Hence the one POST, and no CRUD alongside it.
func NewLaunchController ¶
func NewLaunchController(svc *service.LaunchService) *LaunchController
NewLaunchController returns a handler delegating to svc.
func (*LaunchController) Register ¶
func (h *LaunchController) Register(mux *http.ServeMux)
Register mounts the launch and retry routes. Their literal segments cannot collide with the task collections beside them, so no ordering is implied.
type LinkController ¶
type LinkController struct {
// contains filtered or unexported fields
}
LinkController serves the routes that make Airavata a process's Linkspan control plane: the link Linkspan dials, the owner's Jupyter access, and the Jupyter proxy.
The link and the proxy sit outside bearer authentication, each opened by a secret issued to the process: the link by its link token, offered as a WebSocket subprotocol, and the proxy by its Jupyter token, which Jupyter clients send as "Authorization: token …" or, on WebSockets, as ?token=. Neither header is a bearer token, so the auth middleware lets both through as anonymous.
func NewLinkController ¶
func NewLinkController(svc *service.LinkService) *LinkController
NewLinkController returns a handler delegating to svc.
func (*LinkController) Register ¶
func (h *LinkController) Register(mux *http.ServeMux)
Register mounts the link routes.
type ProcessController ¶
type ProcessController struct {
// contains filtered or unexported fields
}
ProcessController serves /api/v1/processes.
func NewProcessController ¶
func NewProcessController(svc *service.ProcessService) *ProcessController
NewProcessController returns a handler delegating to svc.
func (*ProcessController) Register ¶
func (h *ProcessController) Register(mux *http.ServeMux)
Register mounts the process routes.
type StatusController ¶
type StatusController struct {
// contains filtered or unexported fields
}
StatusController serves read-only access to a process's status history, nested under /api/v1/processes/{processId}.
There is deliberately no POST or PUT: statuses are recorded internally by service.StatusService — from process submission and from whatever submits and monitors the actual job — never accepted as a request body from a client.
func NewStatusController ¶
func NewStatusController(svc *service.StatusService) *StatusController
NewStatusController returns a handler delegating to svc.
func (*StatusController) Register ¶
func (h *StatusController) Register(mux *http.ServeMux)
Register mounts the read-only status routes.
type TaskController ¶
TaskController serves one kind of task nested under /api/v1/processes/{processId}.
The four kinds are the same five routes over a different payload, so the handlers are written once and instantiated per kind. What differs is supplied at construction: the collection's path segment and how a row is rendered.
func NewDataStagingTaskController ¶
func NewDataStagingTaskController(svc *service.DataStagingTaskService) *TaskController[model.DataStagingTask, dto.DataStagingTaskRequest, dto.DataStagingTaskResponse]
NewDataStagingTaskController serves .../data-staging-tasks.
func NewInteractiveCommandTaskController ¶
func NewInteractiveCommandTaskController(svc *service.InteractiveCommandTaskService) *TaskController[model.InteractiveCommandTask, dto.InteractiveCommandTaskRequest, dto.InteractiveCommandTaskResponse]
NewInteractiveCommandTaskController serves .../interactive-command-tasks.
func NewJobMonitoringTaskController ¶
func NewJobMonitoringTaskController(svc *service.JobMonitoringTaskService) *TaskController[model.JobMonitoringTask, dto.JobMonitoringTaskRequest, dto.JobMonitoringTaskResponse]
NewJobMonitoringTaskController serves .../job-monitoring-tasks.
func NewJobSubmissionTaskController ¶
func NewJobSubmissionTaskController(svc *service.JobSubmissionTaskService) *TaskController[model.JobSubmissionTask, dto.JobSubmissionTaskRequest, dto.JobSubmissionTaskResponse]
NewJobSubmissionTaskController serves .../job-submission-tasks.
func (*TaskController[T, Req, Res]) Register ¶
func (h *TaskController[T, Req, Res]) Register(mux *http.ServeMux)
Register mounts the task routes for this kind.
type TaskStatusController ¶
type TaskStatusController struct {
// contains filtered or unexported fields
}
TaskStatusController serves read-only access to the status history of a process's tasks, nested under /api/v1/processes/{processId}.
One route covers all four task kinds: a status names its kind, so a client reads the whole run's task history in one call rather than one per kind.
func NewTaskStatusController ¶
func NewTaskStatusController(svc *service.TaskStatusService) *TaskStatusController
NewTaskStatusController returns a handler delegating to svc.
func (*TaskStatusController) Register ¶
func (h *TaskStatusController) Register(mux *http.ServeMux)
Register mounts the read-only task status routes.
type WorkflowController ¶
type WorkflowController struct {
// contains filtered or unexported fields
}
WorkflowController serves read-only access to the workflows started for a process, nested under /api/v1/processes/{processId}.
There is deliberately no POST or PUT: workflows are recorded by service.WorkflowService when a workflow is started, never accepted as a request body from a client.
func NewWorkflowController ¶
func NewWorkflowController(svc *service.WorkflowService) *WorkflowController
NewWorkflowController returns a handler delegating to svc.
func (*WorkflowController) Register ¶
func (h *WorkflowController) Register(mux *http.ServeMux)
Register mounts the read-only workflow routes.