Modules§
- A
Daemon
-ized wrapper aroundslog
that providesFactory
- andDaemon
-scoped structured logging. This is included in this crate becauseFactory
emits uses thisDaemon
to provide runtime diagnostic information.
Structs§
- A helper data structure for
DaemonBundle
’s.DaemonField
’s are threadsafe and immutable once set. Attempts to set them multiple times result in an error. This allows you to safely registerDaemon
s without having amut
reference to yourFactory
orDaemonBundle
. - A
DaemonRef`` is like an
std::sync::Arc`, except: - The main entry-point for steelmill. A
Factory
manages a set ofDaemon
s via the genericDaemonBundle
type. Application-providedDaemon
methods return the application-specific generic error type,E
.
Enums§
- Errors returned by
Factory
, including aCancellation
error that means we are in the process of shutting down.
Traits§
- Application-level services that are managed by
Factory
. ADaemon
is the unit of depenency injection, and includes methods that allow the factory to manageDaemon
lifecycles. Although lifecycle management is handled via this trait (and therefore theasync_trait
crate, which incurs runtime overhead), application specific interfaces are generally provided directly by theDaemon
without any virtual method or other runtime overhead. - The
DaemonGetter
trait is implemented forDaemonField<T>
, which returnsArc<T>
. However, we don’t allow code to useArc::clone()
during forward operation. Therefore, the public API of Factory always convertsDaemonField<T>
toDaemonRef<T>
, or (via this trait, which is only used byprepare()
,start()
, andstop()
) to `&dyn Daemon``
Functions§
- XXX get rid of this pub! Do not invoke this function directly. It is only exposed in the public API for test purposes, and will be deleted later.