controller

package
v1.0.0-alpha1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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

type TaskController[T any, Req any, Res any] struct {
	// contains filtered or unexported fields
}

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

NewDataStagingTaskController serves .../data-staging-tasks.

func NewInteractiveCommandTaskController

NewInteractiveCommandTaskController serves .../interactive-command-tasks.

func NewJobMonitoringTaskController

NewJobMonitoringTaskController serves .../job-monitoring-tasks.

func NewJobSubmissionTaskController

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL