Expand description
§ZK Stack node initialization framework.
This crate provides core abstractions that allow one to compose a ZK Stack node. Main concepts used in this crate are:
WiringLayer- builder interface for tasks.Task- a unit of work that can be executed by the node.Resource- a piece of logic that can be shared between tasks. Most resources are represented by generic interfaces and also serve as points of customization for tasks.ZkStackService- a container for tasks and resources that takes care of initialization, running and shutting down.ZkStackServiceBuilder- a builder for the service.
Re-exports§
pub use self::resource::Resource;pub use self::service::FromContext;pub use self::service::IntoContext;pub use self::service::StopReceiver;pub use self::task::Task;pub use self::task::TaskId;pub use self::wiring_layer::WiringError;pub use self::wiring_layer::WiringLayer;
Modules§
- implementations
- Implementations of resources and tasks. These are temporarily provided by the framework crate itself, but will be moved to the separate crates in the future.
- resource
- service
- task
- Tasks define the “runnable” concept of the service, e.g. a unit of work that can be executed by the service.
- wiring_
layer
Derive Macros§
- From
Context - Derive macro for the
FromContexttrait. Derive macro for theFromContexttrait. Allows to automatically fetch all the resources and tasks from the context. - Into
Context - Derive macro for the
IntoContexttrait. Derive macro for theIntoContexttrait. Allows to automatically insert all the resources in tasks created by the wiring layer into the context.