Struct edge_schema::schema::CapabilityLocalityV1
source · pub struct CapabilityLocalityV1 {
pub seed: Option<u64>,
pub region_density: Option<u64>,
pub country_densities: Vec<CapabilityLocalityCountryV1>,
pub continent_densities: Vec<CapabilityLocalityContinentV1>,
pub city_densities: Vec<CapabilityLocalityCityV1>,
}
Expand description
The locality configuration allows a workload author to place the workloads that respond to requests at different densities in different locations.
For example, if you wanted to place a single server in the US you would use this locality
locality:
region_density: 0
country_density:
- country: 'US'
density: 1
Or perhaps you want to have the service available in most countries with a decent amount of capacity except for a particular city that is blacklisted
locality:
region_density: 8
city_density:
- city: 'London'
density: 0
The seed value allows the author to randomly move the projection of where the workload runs onto a new set of servers. Simply changing the seed to a different value will randomly place it somewhere different than it was. This can be useful if there are noisy neighbors and you want to place yourself somewhere with different neighbors
locality:
seed: 12345
Fields§
§seed: Option<u64>
Sets the seed for a particular placement strategy
region_density: Option<u64>
Represents the placement density within all the regions unless it is overridden by a country, continent or city locality
country_densities: Vec<CapabilityLocalityCountryV1>
Sets the placement density of a particular country
continent_densities: Vec<CapabilityLocalityContinentV1>
Sets the placement density of a particular continent
city_densities: Vec<CapabilityLocalityCityV1>
Sets the placement density of a particular city
Trait Implementations§
source§impl Clone for CapabilityLocalityV1
impl Clone for CapabilityLocalityV1
source§fn clone(&self) -> CapabilityLocalityV1
fn clone(&self) -> CapabilityLocalityV1
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CapabilityLocalityV1
impl Debug for CapabilityLocalityV1
source§impl Default for CapabilityLocalityV1
impl Default for CapabilityLocalityV1
source§fn default() -> CapabilityLocalityV1
fn default() -> CapabilityLocalityV1
source§impl<'de> Deserialize<'de> for CapabilityLocalityV1
impl<'de> Deserialize<'de> for CapabilityLocalityV1
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>,
source§impl JsonSchema for CapabilityLocalityV1
impl JsonSchema for CapabilityLocalityV1
source§fn schema_name() -> String
fn schema_name() -> String
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moresource§impl Merge for CapabilityLocalityV1
impl Merge for CapabilityLocalityV1
source§fn merge_extend(self, other: &Self) -> Self
fn merge_extend(self, other: &Self) -> Self
source§impl PartialEq for CapabilityLocalityV1
impl PartialEq for CapabilityLocalityV1
source§fn eq(&self, other: &CapabilityLocalityV1) -> bool
fn eq(&self, other: &CapabilityLocalityV1) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for CapabilityLocalityV1
impl Serialize for CapabilityLocalityV1
impl Eq for CapabilityLocalityV1
impl StructuralPartialEq for CapabilityLocalityV1
Auto Trait Implementations§
impl Freeze for CapabilityLocalityV1
impl RefUnwindSafe for CapabilityLocalityV1
impl Send for CapabilityLocalityV1
impl Sync for CapabilityLocalityV1
impl Unpin for CapabilityLocalityV1
impl UnwindSafe for CapabilityLocalityV1
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.