pub struct MeshExpose {
pub identity: MeshIdent,
pub ports: Vec<u16>,
pub allow_from: Vec<MeshPeer>,
}Expand description
Mesh-internal port exposure and peer access control.
Fields§
§identity: MeshIdentDNS-segment mesh identity for this workload. Must be unique in the
cluster. Regex: ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$, length ≤ 63.
ports: Vec<u16>Container-side ports this workload listens on. Other workloads reach
it at <identity>:<port> on the mesh.
allow_from: Vec<MeshPeer>Peers permitted to initiate connections to this workload on the mesh
(W206 / R558-F3). Same-tenant tier rules and explicit cross-tenant
grants share this one list. With no MeshPeer::Tier entries every
same-tenant peer is admitted (the historical “empty = allow all”
default); cross-tenant peers are always denied unless named by a
MeshPeer::CrossTenant entry. See MeshExpose::admits_peer.
Implementations§
Source§impl MeshExpose
impl MeshExpose
Sourcepub fn admits_peer(
&self,
own_tenant: &TenantId,
peer_tenant: &TenantId,
peer_namespace: &NamespaceId,
peer_name: &MeshIdent,
peer_tier: &TierTag,
) -> bool
pub fn admits_peer( &self, own_tenant: &TenantId, peer_tenant: &TenantId, peer_namespace: &NamespaceId, peer_name: &MeshIdent, peer_tier: &TierTag, ) -> bool
Whether a peer may initiate a mesh connection to a workload whose mesh
exposure is self. own_tenant is the tenant of the workload being
protected; the remaining arguments identify the connecting peer.
Deny-by-default across tenants (W206 / R558-F3):
- Same tenant (
own_tenant == peer_tenant): admitted when the peer’s tier matches aMeshPeer::Tierrule, or when there are noTierrules at all (historical “emptyallow_from= allow all same-tenant”). - Cross tenant: admitted only when an explicit
MeshPeer::CrossTenantentry matches the peer’s(tenant, namespace, name).
Trait Implementations§
Source§impl Clone for MeshExpose
impl Clone for MeshExpose
Source§fn clone(&self) -> MeshExpose
fn clone(&self) -> MeshExpose
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MeshExpose
impl Debug for MeshExpose
Source§impl<'de> Deserialize<'de> for MeshExpose
impl<'de> Deserialize<'de> for MeshExpose
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>,
impl Eq for MeshExpose
Source§impl PartialEq for MeshExpose
impl PartialEq for MeshExpose
Source§impl Serialize for MeshExpose
impl Serialize for MeshExpose
impl StructuralPartialEq for MeshExpose
Source§impl TS for MeshExpose
impl TS for MeshExpose
Source§type WithoutGenerics = MeshExpose
type WithoutGenerics = MeshExpose
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or (). The only requirement for these dummy types is that
EXPORT_TO must be None. Read moreSource§type OptionInnerType = MeshExpose
type OptionInnerType = MeshExpose
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete(cfg: &Config) -> String
fn decl_concrete(cfg: &Config) -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl(cfg: &Config) -> String
fn decl(cfg: &Config) -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline(cfg: &Config) -> String
fn inline(cfg: &Config) -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened(cfg: &Config) -> String
fn inline_flattened(cfg: &Config) -> String
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported, relative to the output directory.
The returned path does not include any base directory. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
Source§fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export. Read moreSource§fn export_to_string(cfg: &Config) -> Result<String, ExportError>where
Self: 'static,
fn export_to_string(cfg: &Config) -> Result<String, ExportError>where
Self: 'static,
Auto Trait Implementations§
impl Freeze for MeshExpose
impl RefUnwindSafe for MeshExpose
impl Send for MeshExpose
impl Sync for MeshExpose
impl Unpin for MeshExpose
impl UnsafeUnpin for MeshExpose
impl UnwindSafe for MeshExpose
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.