Skip to main content

Module hooks

Module hooks 

Source
Expand description

Pluggable hook traits exposed to embedders.

The five traits in this module compose the public hook surface that an embedding program plugs into a crate::embed::Server to override the in-crate defaults: backing datastore, seeds provider, network transport listener, crypto provider, and metrics sink.

Every trait is object-safe (Box<dyn Trait> works) and Send + Sync so the implementor can be shared across tokio tasks. Async methods return BoxFuture handles to keep the trait dyn-compatible without depending on the async_trait crate.

Default implementations ship next to each trait. Re-exports at the crate::embed root mean a typical embedder writes use dynomite::embed::SimpleSeedsProvider; without reaching into nested submodules.

Structs§

LoggingMetricsSink
Default metrics sink: emits one tracing::info event per flush. Cheap, dependency-free, and useful in development.
MemcacheDatastore
Default Memcache-fronting datastore.
MemoryDatastore
In-memory datastore used by examples and integration tests.
RedisDatastore
Default Redis-fronting datastore.
RustCryptoProvider
Default crypto provider built on the in-crate crate::crypto::Crypto (RustCrypto-backed AES + RSA).
SimpleSeedsProvider
Re-exported crate::seeds::simple::SimpleSeedsProvider with the embed SeedsProvider trait already implemented.

Enums§

CryptoProviderError
Errors produced by a CryptoProvider.
DatastoreError
Errors produced by a Datastore implementation.
MetricsError
Errors produced by a MetricsSink.
Protocol
Logical wire protocol exposed by a datastore.

Traits§

CryptoProvider
Pluggable AES + RSA provider for the DNODE peer protocol.
Datastore
Backing datastore the engine forwards routed requests to.
MetricsSink
Pluggable metrics exporter.
SeedsProvider
Pluggable seeds provider.

Type Aliases§

BoxFuture
Convenience alias for boxed futures returned by hook traits.
DatastoreByteStream
Type alias for the byte stream returned by Datastore::list_buckets_stream and Datastore::list_keys_stream.
DnsSeedsProvider
DNS-resolving seeds provider, re-exported under the embed trait.
FloridaSeedsProvider
Florida HTTP seeds provider, re-exported under the embed trait.