1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! Application lifecycle helpers for Mae micro-services.
//!
//! This module provides the three building blocks every Mae service needs at
//! startup:
//!
//! - **Configuration** ([`configuration`]) — deserialises YAML config files
//! and environment overrides into a typed [`configuration::Settings`].
//! - **Builder** ([`build`]) — the [`build::App`] and [`build::Run`] traits
//! that services implement to wire up their Actix-Web server, database pool,
//! Redis session store, and custom context.
//! - **Runner** ([`run`]) — the top-level [`run`] async function that
//! initialises telemetry, loads config, and drives the server to completion.
//!
//! Most services only need [`prelude`], which re-exports the complete set of
//! types required in a typical `main.rs`.
// TODO: Im pretty sure the crate::aop::app is not being used at all. -- it has been removed, but
// if something errors when using this crate, look into it.
/// Re-exports [`redis_session`] and [`session_middleware`] from the inner `app` module
/// so that microservices can reach them via `mae::app::{redis_session, session_middleware}`
/// without needing to know the internal module layout.
///
/// - [`redis_session`] — async constructor that connects to Redis and returns a
/// [`RedisSessionStore`] ready to be passed to [`session_middleware`].
/// - [`session_middleware`] — builds the [`SessionMiddleware`] that must be registered
/// with every Actix-Web app that needs persistent user sessions.
pub use ;
pub use *;