#[non_exhaustive]pub struct Config {
pub clusters: Watch<ClusterMap>,
pub filters: Slot<FilterChain>,
pub id: Slot<String>,
pub version: Slot<Version>,
pub datacenters: Watch<DatacenterMap>,
pub icao_code: Slot<IcaoCode>,
pub qcmp_port: Slot<u16>,
}
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.clusters: Watch<ClusterMap>
§filters: Slot<FilterChain>
§id: Slot<String>
§version: Slot<Version>
§datacenters: Watch<DatacenterMap>
§icao_code: Slot<IcaoCode>
§qcmp_port: Slot<u16>
Implementations§
source§impl 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 discovery_request( &self, mode: &Admin, _node_id: &str, resource_type: ResourceType, names: &[String] ) -> Result<Vec<Any>, Error>
sourcepub fn delta_discovery_request(
&self,
mode: &Admin,
subscribed: &BTreeSet<String>,
client_versions: &ClientVersions
) -> Result<DeltaDiscoveryRes>
pub fn delta_discovery_request( &self, mode: &Admin, subscribed: &BTreeSet<String>, client_versions: &ClientVersions ) -> Result<DeltaDiscoveryRes>
Given a list of subscriptions and the current state of the calling client, construct a response with the current state of our resources that differ from those of the client
pub fn apply(&self, response: Resource) -> Result<()>
pub fn apply_delta( &self, resource_type: ResourceType, resources: impl Iterator<Item = Result<(Resource, String)>>, removed_resources: Vec<String>, local_versions: &mut HashMap<String, String> ) -> Result<()>
pub fn apply_metrics(&self)
Trait Implementations§
source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
source§fn 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
source§impl JsonSchema for Config
impl JsonSchema for Config
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§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 Freeze for Config
impl !RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl !UnwindSafe for Config
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> 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