Enum apollo_router::ConfigurationSource
source ยท #[non_exhaustive]pub enum ConfigurationSource {
Static(Box<Configuration>),
Stream(Pin<Box<dyn Stream<Item = Configuration> + Send>>),
File {
path: PathBuf,
watch: bool,
delay: Option<Duration>,
},
}
Expand description
The user supplied config. Either a static instance or a stream for hot reloading.
Variants (Non-exhaustive)ยง
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Static(Box<Configuration>)
A static configuration.
Can be created through serde::Deserialize
from various formats,
or inline in Rust code with serde_json::json!
and serde_json::from_value
.
Stream(Pin<Box<dyn Stream<Item = Configuration> + Send>>)
A configuration stream where the server will react to new configuration. If possible the configuration will be applied without restarting the internal http server.
File
Fields
A yaml file that may be watched for changes
Trait Implementationsยง
sourceยงimpl Debug for ConfigurationSource
impl Debug for ConfigurationSource
sourceยงimpl Default for ConfigurationSource
impl Default for ConfigurationSource
sourceยงimpl Display for ConfigurationSource
impl Display for ConfigurationSource
sourceยงimpl From<Box<Configuration>> for ConfigurationSource
impl From<Box<Configuration>> for ConfigurationSource
sourceยงfn from(original: Box<Configuration>) -> ConfigurationSource
fn from(original: Box<Configuration>) -> ConfigurationSource
Converts to this type from the input type.
sourceยงimpl From<Configuration> for ConfigurationSource
impl From<Configuration> for ConfigurationSource
sourceยงfn from(original: Configuration) -> ConfigurationSource
fn from(original: Configuration) -> ConfigurationSource
Converts to this type from the input type.
Auto Trait Implementationsยง
impl !RefUnwindSafe for ConfigurationSource
impl Send for ConfigurationSource
impl !Sync for ConfigurationSource
impl Unpin for ConfigurationSource
impl !UnwindSafe for ConfigurationSource
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
sourceยงimpl<T> FutureExt for T
impl<T> FutureExt for T
sourceยงfn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
sourceยงfn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceยงimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourceยงfn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request