Expand description
Dependency injection module. This module provides tools to initialize and share resources and services amongst different threads.
It takes all its inputs from the configuration which should combine inputs from:
- environment
- command line
- configuration files
- default values
The Builder ensure every services has required dependencies to build and provide services containers for each sub process.
Macros§
- get_
dependency - Retrieve attribute stored in the builder. If not yet initialized, we instantiate it by calling the associated build function (build_<attribute_name>). If we don’t want to to use the default build function, we can pass an expression that build the value. Usage examples: get_dependency!(self.signer_registerer) get_dependency!(self.signer_registerer = self.build_signer_registerer().await?)
Structs§
- Database
Command Dependencies Container - Dependencies container for the database commands
- Dependencies
Builder - Dependencies container builder
- Genesis
Command Dependencies Container - Dependencies container for the genesis commands
- Serve
Command Dependencies Container - Dependencies container for the serve command
- Tools
Command Dependencies Container - Dependencies container for the tools commands
Enums§
- Dependencies
Builder Error - Error that can occur during dependencies initialization process.
Type Aliases§
- Epoch
Service Wrapper - EpochServiceWrapper wraps
- Result
- Result with the DependenciesBuilderError error.