Crate polkadot_overseer
source ·Expand description
Overseer
overseer implements the Overseer architecture described in the
implementers-guide.
For the motivations behind implementing the overseer itself you should
check out that guide, documentation in this crate will be mostly discussing
technical stuff.
An Overseer is something that allows spawning/stopping and overseeing
asynchronous tasks as well as establishing a well-defined and easy to use
protocol that the tasks can use to communicate with each other. It is desired
that this protocol is the only way tasks communicate with each other, however
at this moment there are no foolproof guards against other ways of communication.
The Overseer is instantiated with a pre-defined set of Subsystems that
share the same behavior from Overseer’s point of view.
+-----------------------------+
| Overseer |
+-----------------------------+
................| Overseer "holds" these and uses |..............
. them to (re)start things .
. .
. +-------------------+ +---------------------+ .
. | Subsystem1 | | Subsystem2 | .
. +-------------------+ +---------------------+ .
. | | .
..................................................................
| |
start() start()
V V
..................| Overseer "runs" these |.......................
. +--------------------+ +---------------------+ .
. | SubsystemInstance1 | | SubsystemInstance2 | .
. +--------------------+ +---------------------+ .
..................................................................Re-exports
pub use polkadot_node_subsystem_types::jaeger;pub use self::metrics::Metrics as OverseerMetrics;pub use self::dummy::DummySubsystem;pub use polkadot_node_metrics::metrics::prometheus;pub use orchestra as gen;pub use orchestra as gen;Modules
Structs
Overseer on the particular block
that has been imported or finalized.PhantomData is used for type hinting when creating uninitialized
builder, e.g. to avoid specifying the generics when instantiating
the FooBuilder when calling Foo::builder()Subsystem upon spawning.
It can be used by Subsystem to communicate with other Subsystems
or to spawn it’s SubsystemJobs.trait orchestra::Spawner and SpawnNamed from substrate.Subsystem.Meters of a subsystem.Enums
Subsystem to the declared orchestra.Constants
Traits
#generated_outgoing: From<M> for all annotated types
of a particular subsystem.Future to allow time-limited futures.Functions
Overseer and BlockchainEvents by forwarding
import and finality notifications into the OverseerHandle.self using spawner S.