[docs]classOnBindEvent(Event):""" «Bind» event happens before the service container is resolved. It is the right place to define services that may not be resolvable yet (because their dependencies may, or may not, be defined already). """name="harp.config.bind"#: Service container.container:Container#: Global settings.settings:GlobalSettings
#: Event fired when the service container is being configured, before the dependencies are resolved. You can configure#: any services in a listener to this event, but all dependencies must be resolvable once the event is fully dispatched.EVENT_BIND=OnBindEvent.nameOnBindHandler=Callable[[OnBindEvent],Awaitable[None]]
[docs]classOnBoundEvent(Event):""" «Bound» event happens after the service container is resolved, before the kernel creation. It is the right place to setup things that needs the container to be resolved (thus, you get a `provider` instead of a `container`). """name="harp.config.bound"#: Services provider.provider:Services#: Proxy controller resolver.resolver:"ProxyControllerResolver"
#: Event fired when the service container is fully resolved, before the kernel is created. You can setup things that#: require live instance of services here.EVENT_BOUND=OnBoundEvent.nameOnBoundHandler=Callable[[OnBoundEvent],Awaitable[None]]
[docs]classOnReadyEvent(Event):""" «Ready» event happens after the asgi kernel is created, just before the application starts. It is the right place to decorate the kernel with middlewares. """name="harp.config.ready"
#: Event fired when the application is ready to start. You can decorate the kernel with middlewares here.EVENT_READY=OnReadyEvent.nameOnReadyHandler=Callable[[OnReadyEvent],Awaitable[None]]
[docs]classOnShutdownEvent(Event):""" «Shutdown» event happens when the application is stopping. """name="harp.config.shutdown"
#: Event fired when the application is shutting down. You can cleanup resources here.EVENT_SHUTDOWN=OnShutdownEvent.nameOnShutdownHandler=Callable[[OnShutdownEvent],Awaitable[None]]