pub struct RuntimeHttpHost { /* private fields */ }Expand description
Embedded HTTP host for stable Runtime health, status, command, and query routes.
Implementations§
Source§impl RuntimeHttpHost
impl RuntimeHttpHost
Sourcepub fn new(config: HttpApiConfig, static_info: RuntimeStaticInfo) -> Self
pub fn new(config: HttpApiConfig, static_info: RuntimeStaticInfo) -> Self
Creates a host exposing only static operational information.
Sourcepub fn with_controller(
config: HttpApiConfig,
static_info: RuntimeStaticInfo,
controller: Arc<Mutex<RuntimeController>>,
) -> Self
pub fn with_controller( config: HttpApiConfig, static_info: RuntimeStaticInfo, controller: Arc<Mutex<RuntimeController>>, ) -> Self
Creates a host connected to a Runtime controller.
Sourcepub fn with_runtime_state_and_auth(
config: HttpApiConfig,
static_info: RuntimeStaticInfo,
controller: Arc<Mutex<RuntimeController>>,
sync_log: Option<Arc<dyn SyncLogView>>,
tick_counter: Option<Arc<AtomicU64>>,
auth: HttpCommandAuth,
) -> Self
pub fn with_runtime_state_and_auth( config: HttpApiConfig, static_info: RuntimeStaticInfo, controller: Arc<Mutex<RuntimeController>>, sync_log: Option<Arc<dyn SyncLogView>>, tick_counter: Option<Arc<AtomicU64>>, auth: HttpCommandAuth, ) -> Self
Creates a host with controller, sync status, tick counter, and token policy.
Sourcepub fn with_runtime_state_auth_and_operation_mode(
config: HttpApiConfig,
static_info: RuntimeStaticInfo,
controller: Arc<Mutex<RuntimeController>>,
sync_log: Option<Arc<dyn SyncLogView>>,
tick_counter: Option<Arc<AtomicU64>>,
auth: HttpCommandAuth,
operation_mode: Arc<Mutex<RuntimeOperationalMode>>,
) -> Self
pub fn with_runtime_state_auth_and_operation_mode( config: HttpApiConfig, static_info: RuntimeStaticInfo, controller: Arc<Mutex<RuntimeController>>, sync_log: Option<Arc<dyn SyncLogView>>, tick_counter: Option<Arc<AtomicU64>>, auth: HttpCommandAuth, operation_mode: Arc<Mutex<RuntimeOperationalMode>>, ) -> Self
Creates an authenticated host with a live operational-mode source.
Sourcepub fn with_runtime_state_auth_and_app_queries(
config: HttpApiConfig,
static_info: RuntimeStaticInfo,
controller: Arc<Mutex<RuntimeController>>,
sync_log: Option<Arc<dyn SyncLogView>>,
tick_counter: Option<Arc<AtomicU64>>,
auth: HttpCommandAuth,
app_query_router: Arc<Mutex<ApiRouter>>,
) -> Self
pub fn with_runtime_state_auth_and_app_queries( config: HttpApiConfig, static_info: RuntimeStaticInfo, controller: Arc<Mutex<RuntimeController>>, sync_log: Option<Arc<dyn SyncLogView>>, tick_counter: Option<Arc<AtomicU64>>, auth: HttpCommandAuth, app_query_router: Arc<Mutex<ApiRouter>>, ) -> Self
Creates an authenticated host with application query routing.
Sourcepub fn with_state_parts(
config: HttpApiConfig,
static_info: RuntimeStaticInfo,
parts: RuntimeHttpStateParts,
) -> Self
pub fn with_state_parts( config: HttpApiConfig, static_info: RuntimeStaticInfo, parts: RuntimeHttpStateParts, ) -> Self
Creates a host from the complete set of optional shared state parts.
Sourcepub fn config(&self) -> &HttpApiConfig
pub fn config(&self) -> &HttpApiConfig
Returns immutable listener and payload-limit configuration.
Sourcepub fn router(&self) -> Router
pub fn router(&self) -> Router
Returns an Axum router suitable for embedding in another listener.
Sourcepub fn run_until_shutdown(&self, shutdown: Arc<AtomicBool>) -> Result<()>
pub fn run_until_shutdown(&self, shutdown: Arc<AtomicBool>) -> Result<()>
Runs the configured listener until shutdown becomes true.
Auto Trait Implementations§
impl !RefUnwindSafe for RuntimeHttpHost
impl !UnwindSafe for RuntimeHttpHost
impl Freeze for RuntimeHttpHost
impl Send for RuntimeHttpHost
impl Sync for RuntimeHttpHost
impl Unpin for RuntimeHttpHost
impl UnsafeUnpin for RuntimeHttpHost
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more