RequestContext¶
- class controller.dependencies.context.RequestContext(request, logger, factory, image_service, lab_manager, _fileserver_manager)¶
Bases:
object
Holds the incoming request and its surrounding context.
This object is provided to every route handler via a dependency and contains the factory to create service objects, any global singletons that route handlers need to use, and other per-request information that is needed by route handlers.
- Parameters:
request (
Request
)logger (
BoundLogger
)factory (
Factory
)image_service (
ImageService
)lab_manager (
LabManager
)_fileserver_manager (
FileserverManager
|None
)
Attributes Summary
Component factory.
File server manager, if file servers are configured.
Global image service.
User lab state.
Request logger, rebound with discovered context.
Incoming request.
Methods Summary
rebind_logger
(**values)Add the given values to the logging context.
Attributes Documentation
- fileserver_manager¶
File server manager, if file servers are configured.
-
image_service:
ImageService
¶ Global image service.
-
lab_manager:
LabManager
¶ User lab state.
-
logger:
BoundLogger
¶ Request logger, rebound with discovered context.
-
request:
Request
¶ Incoming request.
Methods Documentation