Components are objects that depend on a running service container. They are
Since Componentized objects themselves are components, they form a tree of
Component instances with the container as the root. An example
of a Component is
Component(error_hook=None, pool=None, metrics=None)¶
A Hook object that propagates exceptions for this component. Defaults to the
error_hookof the parent component.
A pool that holds greenlets related to the component. Defaults to the
poolof the parent component.
Aggregateof metrics for this component. Defaults to the
metricsof the parent component.
Called when the container is started.
Called when the container is stopped.
spawn(func, *args, **kwargs)¶
Spawns a new greenlet in the greenlet pool of this component. If
funcexits with an exception, it is reported to the