Expand description
Incoming event handling, from the first signature check to the timeline.
The service authorizes incoming PDUs, fetches the events they depend on, derives their state and appends them. Observability counters cover the local state build, the previous-event walk and the backoff verdicts. A per-room history keeps the previous-event walk passes for up to three days.
Re-exportsΒ§
use std::fmt::Write;πuse std::num::NonZeroUsize;πuse std::sync::Arc;πuse async_trait::async_trait;πuse ruma::EventId;πuse ruma::OwnedRoomId;πuse ruma::RoomVersionId;πuse ruma::events::AnyStrippedStateEvent;πuse ruma::serde::Raw;πuse tuwunel_core::Result;πuse tuwunel_core::implement;πuse tuwunel_core::utils::MutexMap;πuse tuwunel_database::Map;πuse tuwunel_matrix::PduEvent;πuse self::backoff::BackoffCounters;πuse self::prev_walk::InFlightWalks;πuse self::prev_walk::PrevWalkCounters;πuse self::state_local_build::StateLocalCounters;πpub use self::backoff::BackoffMetrics;pub use self::backoff::Verdicts;pub use self::policy_server::PolicyCheck;pub use self::prev_walk::InFlightWalk;pub use self::prev_walk::Outcome as PrevWalkOutcome;pub use self::prev_walk::PrevWalkMetrics;pub use self::prev_walk::PrevWalkPass;pub use self::prev_walk::PrevWalkRoom;pub use self::prev_walk::Walk;pub use self::state_local_build::LocalBuildReport;pub use self::state_local_build::StateLocalMetrics;use crate::service::make_name;π
ModulesΒ§
- acl_
check π - backoff π
- fetch_
auth π - fetch_
prev π - fetch_
state π - handle_
incoming_ πpdu - handle_
outlier_ πpdu - handle_
prev_ πpdu - outlier_
state π - parse_
incoming_ πpdu - policy_
server π - prev_
walk π - resolve_
state π - state_
at_ πincoming - state_
local_ πbuild - upgrade_
outlier_ πpdu
StructsΒ§
- Data π
- Service
- Handles incoming events: authorization, fetching missing events, state resolution and upgrade into the timeline.
ConstantsΒ§
FunctionsΒ§
- room_
version_ πof - Extract a roomβs version from the create event in a stripped-state list (as stored for an out-of-band invite or knock).
Type AliasesΒ§
- Room
Mutex πMap