Crate polkadot_overseer_gen[][src]

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 | <-- bidir --> | SubsystemInstance2  |  .
            .  +--------------------+               +---------------------+  .
            ..................................................................

Structs

A wrapping type for messages.

Watermark to track the received signals.

An asynchronous subsystem task..

A running instance of some Subsystem.

Set of readouts of the Meters of a subsystem.

Collection of meters related to a subsystem.

A future that wraps another future with a Delay allowing for time-limited futures.

An error indicating that this the over-arching message type had the wrong variant

Enums

A message type that a subsystem receives from an overseer. It wraps signals from an overseer and messages that are circulating between subsystems.

An error type that describes faults that may happen

A type of messages that are sent from Subsystem to [Overseer].

Traits

A trait to support the origin annotation such that errors across subsystems can be easier tracked.

A helper trait to map a subsystem to smth. else.

A trait that describes the Subsystems that can run on the Overseer.

A context type that is given to the Subsystem upon spawning. It can be used by Subsystem to communicate with other Subsystems or spawn jobs.

Sender end of a channel to interface with a subsystem.

Extends Future to allow time-limited futures.

Functions

Create a packet from its parts.

Type Definitions

Alias for a result with error type OverseerError.

Incoming messages from both the bounded and unbounded channel.

Attribute Macros