pub struct RemoteSource { /* private fields */ }
Expand description
Configuration source that loads from a remote HTTP endpoint
Implementations§
Source§impl RemoteSource
impl RemoteSource
Sourcepub fn auth_token<S: Into<String>>(self, token: S) -> Self
pub fn auth_token<S: Into<String>>(self, token: S) -> Self
Set the authentication token
Sourcepub fn poll_interval(self, interval: Duration) -> Self
pub fn poll_interval(self, interval: Duration) -> Self
Set the polling interval for watching changes
Trait Implementations§
Source§impl ConfigSource for RemoteSource
impl ConfigSource for RemoteSource
Source§fn load<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ConfigValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ConfigValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Load configuration from this source
Source§fn supports_watching(&self) -> bool
fn supports_watching(&self) -> bool
Check if this source supports watching for changes
Source§fn start_watching<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Receiver<ConfigValue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_watching<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Receiver<ConfigValue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start watching for changes (if supported)
Auto Trait Implementations§
impl Freeze for RemoteSource
impl !RefUnwindSafe for RemoteSource
impl Send for RemoteSource
impl Sync for RemoteSource
impl Unpin for RemoteSource
impl !UnwindSafe for RemoteSource
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