Skip to main content

Module rendezvous

Module rendezvous 

Source
Expand description

In-memory rendezvous session exchange.

The service holds short-lived client rendezvous payloads, conditional validators, recorded transactions, and per-client rate-limit buckets. Sessions are bounded in count and intentionally disappear on restart.

Re-exportsยง

use std::cmp::max; ๐Ÿ”’
use std::collections::BTreeMap; ๐Ÿ”’
use std::collections::HashMap; ๐Ÿ”’
use std::collections::VecDeque; ๐Ÿ”’
use std::net::IpAddr; ๐Ÿ”’
use std::str; ๐Ÿ”’
use std::sync::Arc; ๐Ÿ”’
use std::sync::Mutex; ๐Ÿ”’
use std::sync::RwLock; ๐Ÿ”’
use std::time::Duration; ๐Ÿ”’
use std::time::Instant; ๐Ÿ”’
use std::time::SystemTime; ๐Ÿ”’
use std::time::UNIX_EPOCH; ๐Ÿ”’
use base64::Engine as _; ๐Ÿ”’
use base64::engine::general_purpose::URL_SAFE_NO_PAD as b64; ๐Ÿ”’
use bytes::Bytes; ๐Ÿ”’
use http::StatusCode; ๐Ÿ”’
use ruma::OwnedTransactionId; ๐Ÿ”’
use ruma::TransactionId; ๐Ÿ”’
use ruma::api::error::ErrorKind; ๐Ÿ”’
use ruma::api::error::LimitExceededErrorData; ๐Ÿ”’
use tuwunel_core::Error; ๐Ÿ”’
use tuwunel_core::Result; ๐Ÿ”’
use tuwunel_core::arrayvec::ArrayString; ๐Ÿ”’
use tuwunel_core::implement; ๐Ÿ”’
use tuwunel_core::utils::hash::sha256::concat; ๐Ÿ”’
use tuwunel_core::utils::rand::string_array; ๐Ÿ”’
use tuwunel_core::utils::time::duration_since_epoch; ๐Ÿ”’

Structsยง

Attempt
A single send attempt under a sequence token.
Meta
HTTP metadata associated with a rendezvous payload.
Service
Stores bounded rendezvous sessions and request rate-limit state.
Session ๐Ÿ”’
Complete process-local state for one rendezvous session.

Enumsยง

Get
Outcome of retrieving a rendezvous session.
Put
Outcome of conditionally replacing a rendezvous payload.

Constantsยง

ETAG_LENGTH ๐Ÿ”’
ETAG_VALUE_LENGTH ๐Ÿ”’
MAX_HTTP_DATE_SECONDS ๐Ÿ”’
MAX_TRANSACTIONS ๐Ÿ”’
MILLIS_PER_SECOND ๐Ÿ”’
MONOTONIC_STEP ๐Ÿ”’
RATELIMIT_MAP_CAP ๐Ÿ”’
SESSION_ID_LENGTH ๐Ÿ”’

Functionsยง

check_bucket_at ๐Ÿ”’
etag ๐Ÿ”’
etag_matches ๐Ÿ”’
etag_value ๐Ÿ”’
expires_at ๐Ÿ”’
get_outcome ๐Ÿ”’
next_last_modified ๐Ÿ”’

Type Aliasesยง

Etag
Quoted HTTP entity tag for rendezvous payload state.
Ratelimiter ๐Ÿ”’
SessionId
Fixed-capacity identifier for a rendezvous session.
Sessions ๐Ÿ”’
Transactions ๐Ÿ”’