Expand description
Fetches TURN credentials from an external provider.
One set of credentials is shared by every user and renewed after half its lifetime, so the provider sees a bounded number of requests however many clients ask. A failed fetch pauses further attempts for a minute, while any unexpired credentials keep being served.
Re-exportsยง
use std::module_path;๐use std::sync::Arc;๐use std::time::Duration;๐use std::time::Instant;๐use async_trait::async_trait;๐use ruma::api::client::voip::get_turn_server_info::v3::Response as Credentials;๐use tokio::sync::Mutex;๐use tuwunel_core::Error;๐use tuwunel_core::Result;๐use tuwunel_core::config::turn::Provider;๐use tuwunel_core::err;๐use tuwunel_core::implement;๐use tuwunel_core::warn;๐use crate::Args;๐use crate::SelfServices;๐use crate::service::make_name;๐
Modulesยง
- provider ๐
- Requests TURN credentials from the configured provider.
Structsยง
Enumsยง
- Lookup ๐
- What the cache offers a caller.
Constantsยง
- RETRY_
DELAY ๐ - Pause after a failed fetch before the provider is asked again.
Functionsยง
- origin ๐
- Identifies the provider cached credentials came from.
- unavailable ๐