A Daemon-ized wrapper around slog that provides Factory- and Daemon-scoped structured logging.
This is included in this crate because Factory emits uses this Daemon to provide runtime diagnostic
information.
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 register Daemons
without having a mut reference to your Factory or DaemonBundle.
The main entry-point for steelmill. A Factory manages a set of Daemons via
the generic DaemonBundle type. Application-provided Daemon methods return
the application-specific generic error type, E.
Application-level services that are managed by Factory. A Daemon is the unit
of depenency injection, and includes methods that allow the factory to manage
Daemon lifecycles. Although lifecycle management is handled via this trait
(and therefore the async_trait crate, which incurs runtime overhead), application
specific interfaces are generally provided directly by the Daemon without any
virtual method or other runtime overhead.
The DaemonGetter trait is implemented for DaemonField<T>, which returns
Arc<T>. However, we don’t allow code to use Arc::clone() during forward
operation. Therefore, the public API of Factory always converts
DaemonField<T> to DaemonRef<T>, or (via this trait, which is only used
by prepare(), start(), and stop()) to `&dyn Daemon``