Skip to main content

Crate photon_runtime

Crate photon_runtime 

Source
Expand description

Photon runtime builder and process-wide configuration — Integrating the host.

Re-exports§

pub use admin::collect_admin_snapshot;
pub use admin::AdminBackendSummary;
pub use admin::AdminCheckpointSummary;
pub use admin::AdminHandlerSummary;
pub use admin::AdminSnapshot;
pub use admin::AdminTopicSummary;

Modules§

admin
Read-only admin introspection for host ops UIs.
runtime
Host-facing runtime wiring helpers (Integrating the host).

Structs§

BackendCapabilities
Capabilities advertised by a storage port (surfaced via crate::backend::GenericPhotonBackend).
BackendContext
Shared builder context for storage adapter install fns.
Envelope
Event envelope with decoded payload.
Event
Published event with payload and metadata.
ExecutorController
Controls background handler dispatch tasks started by Photon::start_executor.
GenericPhotonBackend
Unified backend — all storage adapters install this wrapping their port.
GroupOpts
Options specific to consumer-group subscriptions.
HandlerCtx
Delivery metadata for a single handler invocation.
HandlerDescriptor
Descriptor for a #[photon::subscribe] handler (inventory + executor dispatch).
HandlerRegistry
Registry of inventory-submitted subscription handlers.
InProcStoragePort
In-process storage for the mem adapter tier.
Photon
Main Photon runtime handle.
PhotonBuilder
Builder for constructing Photon runtimes — Integrating the host.
PhotonRuntimeState
Shared storage port, executor services, and handler dispatch controller.
SubscribeOpts
Options for subscribing to a topic.
Subscription
Subscription handler registration.
SubscriptionHandle
Placeholder for future subscription lifecycle control (cancel, pause).
TopicDescriptor
Descriptor for a registered topic (from #[photon::topic] macro).
TopicRegistry
Registry of all topics discovered via #[photon::topic].
TransportCrypto
Symmetric payload encryption (XChaCha20-Poly1305).

Enums§

PhotonError
Errors that can occur in Photon operations.
SubscriptionMode
Subscription mode.

Traits§

PhotonBackend
Backend for publish/subscribe delivery and checkpoint persistence.
StoragePort
Storage adapter contract — append, subscribe, checkpoints, and optional retention.

Functions§

configure
Configure the default Photon instance used by macro-generated convenience helpers (Type::publish() / Type::subscribe()).
default
Clone of the process-wide Photon set by configure, if any.
resolve_photon_remote_base_url
Origin + path prefix before /api/photon (no trailing slash).

Type Aliases§

EmbeddedBackend
Back-compat alias for the default in-process mem tier GenericPhotonBackend.
Result
Result type alias for Photon operations.