#[non_exhaustive]pub struct Config {
pub admin: Slot<Admin>,
pub clusters: Slot<ClusterMap>,
pub filters: Slot<FilterChain>,
pub id: Slot<String>,
pub management_servers: Slot<Vec<ManagementServer>>,
pub port: Slot<u16>,
pub version: Slot<Version>,
pub maxmind_db: Slot<Source>,
/* private fields */
}
Expand description
Config is the configuration of a proxy
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.admin: Slot<Admin>
clusters: Slot<ClusterMap>
filters: Slot<FilterChain>
id: Slot<String>
management_servers: Slot<Vec<ManagementServer>>
port: Slot<u16>
version: Slot<Version>
maxmind_db: Slot<Source>
Implementations
sourceimpl Config
impl Config
sourcepub fn from_reader<R: Read>(input: R) -> Result<Self, Error>
pub fn from_reader<R: Read>(input: R) -> Result<Self, Error>
Attempts to deserialize input
as a YAML object representing Self
.
pub fn update_from_json(&self, map: Map<String, Value>) -> Result<(), Error>
pub fn discovery_request(
&self,
_node_id: &str,
resource_type: ResourceType,
names: &[String]
) -> Result<DiscoveryResponse, Error>
pub fn apply(&self, response: &Resource) -> Result<()>
pub fn apply_metrics(&self)
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl JsonSchema for Config
impl JsonSchema for Config
sourcefn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
sourcefn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreAuto Trait Implementations
impl !RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl !UnwindSafe for Config
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request