pub struct UpstreamConfig {Show 15 fields
pub url: Url,
pub transport: UpstreamTransport,
pub credentials: Option<Credentials>,
pub reconnect: ReconnectPolicy,
pub request_timeout: Duration,
pub media_idle_timeout: Duration,
pub follow_redirects: bool,
pub allow_cross_origin_redirect: bool,
pub resolved: Option<SocketAddr>,
pub jitter: JitterBufferConfig,
pub cached_description: Option<Arc<MediaDescription>>,
pub continuity: ContinuityPolicy,
pub startup_cache: StartupCacheConfig,
pub fallbacks: Vec<UpstreamEndpoint>,
pub failover: FailoverPolicy,
/* private fields */
}Fields§
§url: Url§transport: UpstreamTransport§credentials: Option<Credentials>§reconnect: ReconnectPolicy§request_timeout: Duration§media_idle_timeout: Duration§follow_redirects: bool§allow_cross_origin_redirect: bool§resolved: Option<SocketAddr>§jitter: JitterBufferConfig§cached_description: Option<Arc<MediaDescription>>§continuity: ContinuityPolicy§startup_cache: StartupCacheConfig§fallbacks: Vec<UpstreamEndpoint>§failover: FailoverPolicyImplementations§
Source§impl UpstreamConfig
impl UpstreamConfig
pub fn new(url: Url, transport: UpstreamTransport) -> Self
pub fn add_fallback(&mut self, endpoint: UpstreamEndpoint)
pub fn endpoints(&self) -> Vec<UpstreamEndpoint>
pub fn state(&self) -> ProxyState
pub fn set_state(&self, state: ProxyState)
Sourcepub fn reset_state(&mut self)
pub fn reset_state(&mut self)
Detach the shared proxy state from other clones (for example when a
restart re-registers the same upstream while the old worker is still
shutting down, so a late Stopped cannot overwrite the new state).
pub fn next_retry(&self, attempts: u32) -> Duration
Trait Implementations§
Source§impl Clone for UpstreamConfig
impl Clone for UpstreamConfig
Source§impl TryFrom<ProxyRoute> for UpstreamConfig
impl TryFrom<ProxyRoute> for UpstreamConfig
Auto Trait Implementations§
impl Forget for UpstreamConfig
impl Freeze for UpstreamConfigwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<MediaDescription> is !null: Freeze,
PhantomData<ArcInner<MediaDescription>>: Freeze,
PhantomData<UpstreamEndpoint>: Freeze,
*const ArcInner<Mutex<ProxyState>> is !null: Freeze,
PhantomData<ArcInner<Mutex<ProxyState>>>: Freeze,
impl Move for UpstreamConfig
impl RefUnwindSafe for UpstreamConfig
impl Send for UpstreamConfig
impl Sync for UpstreamConfig
impl Unpin for UpstreamConfig
impl UnsafeUnpin for UpstreamConfigwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<MediaDescription> is !null: UnsafeUnpin,
PhantomData<ArcInner<MediaDescription>>: UnsafeUnpin,
PhantomData<UpstreamEndpoint>: UnsafeUnpin,
*const ArcInner<Mutex<ProxyState>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<ProxyState>>>: UnsafeUnpin,
impl UnwindSafe for UpstreamConfigwhere
RawVecInner: UnwindSafe,
Arc<MediaDescription>: UnwindSafe,
Arc<Mutex<ProxyState>>: UnwindSafe,
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