ProcessContext#

class controller.factory.ProcessContext(config, http_client, kubernetes_client, image_service, prepuller, lab_manager, _fileserver_manager, background)#

Bases: object

Per-process global application state.

This object holds all of the per-process singletons and is managed by ContextDependency. It is used by the Factory class as a source of dependencies to inject into created service and storage objects, and by the context dependency as a source of singletons that should also be exposed to route handlers via the request context.

Parameters:

Attributes Summary

background

Manager for background tasks.

config

Lab controller configuration.

http_client

Shared HTTP client.

image_service

Image service.

kubernetes_client

Shared Kubernetes client.

lab_manager

State management for user lab pods.

prepuller

Prepuller.

Attributes Documentation

background: BackgroundTaskManager#

Manager for background tasks.

config: Config#

Lab controller configuration.

http_client: AsyncClient#

Shared HTTP client.

image_service: ImageService#

Image service.

kubernetes_client: ApiClient#

Shared Kubernetes client.

lab_manager: LabManager#

State management for user lab pods.

prepuller: Prepuller#

Prepuller.