pub struct EnvironmentHostConfig {
pub env_id: EnvId,
pub region: Option<String>,
pub tenant_org_id: Option<String>,
pub listen_addr: Option<SocketAddr>,
pub public_base_url: Option<String>,
}Expand description
Host-level config moved out of greentic-config-types::EnvironmentConfig
(§5.1). Identity-only — connectivity, region, and deployment ctx; nothing
secret, nothing tenant-scoped.
Fields§
§env_id: EnvId§region: Option<String>§tenant_org_id: Option<String>Tenant organization the env belongs to. None for local.
listen_addr: Option<SocketAddr>Bind address for the runtime’s local HTTP listener. Set at op env init
to DEFAULT_LISTEN_ADDR so a freshly-initialized env can be started
with no bundles attached. The runtime (gtc start) may layer its own
env-var override on top — see the greentic-start docs for the
concrete name and precedence; this crate stays implementation-agnostic.
public_base_url: Option<String>Persistent public base URL the runtime exposes (e.g. via a static
tunnel or load balancer). Stored as origin only — https://host[:port],
no path, no query, no fragment. Validated by Environment::validate
(so save AND load both reject invalid values via [LocalFsStore]).
Runtime precedence (env var override vs. tunnel-discovered vs. persisted)
is greentic-start’s concern; this crate persists the configured value
only.
Implementations§
Source§impl EnvironmentHostConfig
impl EnvironmentHostConfig
Sourcepub fn resolved_listen_addr(&self) -> SocketAddr
pub fn resolved_listen_addr(&self) -> SocketAddr
Resolves the bind address using self.listen_addr falling back to
DEFAULT_LISTEN_ADDR. Runtime-level env-var precedence (if any) is
the caller’s responsibility — this helper is the persisted-state
resolution only.
Trait Implementations§
Source§impl Clone for EnvironmentHostConfig
impl Clone for EnvironmentHostConfig
Source§fn clone(&self) -> EnvironmentHostConfig
fn clone(&self) -> EnvironmentHostConfig
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 EnvironmentHostConfig
impl Debug for EnvironmentHostConfig
Source§impl<'de> Deserialize<'de> for EnvironmentHostConfig
impl<'de> Deserialize<'de> for EnvironmentHostConfig
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 EnvironmentHostConfig
Source§impl From<&EnvironmentConfig> for EnvironmentHostConfig
impl From<&EnvironmentConfig> for EnvironmentHostConfig
Source§fn from(value: &EnvironmentConfig) -> Self
fn from(value: &EnvironmentConfig) -> Self
Source§impl From<EnvironmentConfig> for EnvironmentHostConfig
impl From<EnvironmentConfig> for EnvironmentHostConfig
Source§fn from(value: EnvironmentConfig) -> Self
fn from(value: EnvironmentConfig) -> Self
Source§impl PartialEq for EnvironmentHostConfig
impl PartialEq for EnvironmentHostConfig
Source§fn eq(&self, other: &EnvironmentHostConfig) -> bool
fn eq(&self, other: &EnvironmentHostConfig) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for EnvironmentHostConfig
impl Serialize for EnvironmentHostConfig
impl StructuralPartialEq for EnvironmentHostConfig
Auto Trait Implementations§
impl Freeze for EnvironmentHostConfig
impl RefUnwindSafe for EnvironmentHostConfig
impl Send for EnvironmentHostConfig
impl Sync for EnvironmentHostConfig
impl Unpin for EnvironmentHostConfig
impl UnsafeUnpin for EnvironmentHostConfig
impl UnwindSafe for EnvironmentHostConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.