pub struct InfraContext<'a> {
pub backend: &'a StaticBackendDispatcher,
pub site_name: &'a str,
pub shasta_base_url: &'a str,
pub shasta_root_cert: &'a [u8],
pub socks5_proxy: Option<&'a str>,
pub vault_base_url: Option<&'a str>,
pub gitea_base_url: &'a str,
pub k8s_api_url: Option<&'a str>,
}Expand description
Infrastructure context needed by the service layer: backend dispatcher, API endpoints, and TLS certificates.
Constructed per-request by ServerState::infra_context(site_name)
from the matching [sites.X] block in server.toml. The borrows
live for the duration of the handler call.
Fields§
§backend: &'a StaticBackendDispatcherBackend client (CSM or OCHAMI) for this site.
site_name: &'a strName of the site this context belongs to, sourced from the
X-Manta-Site header on the inbound request.
shasta_base_url: &'a strBase URL of the site’s CSM / OpenCHAMI API
(e.g. https://api.alps.cscs.ch).
shasta_root_cert: &'a [u8]DER- or PEM-encoded root CA bytes for verifying TLS against
shasta_base_url.
socks5_proxy: Option<&'a str>Optional per-site SOCKS5 proxy URL forwarded to every outbound HTTP request for this site’s backend.
vault_base_url: Option<&'a str>Optional Vault base URL; None makes Vault-dependent handlers
return 501.
gitea_base_url: &'a strBase URL of the site’s Gitea VCS, used by SAT-file rendering
and run session to resolve repository references.
k8s_api_url: Option<&'a str>Optional Kubernetes API URL; None makes k8s-dependent handlers
(console, session-logs SSE) return 501.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for InfraContext<'a>
impl<'a> !RefUnwindSafe for InfraContext<'a>
impl<'a> Send for InfraContext<'a>
impl<'a> Sync for InfraContext<'a>
impl<'a> Unpin for InfraContext<'a>
impl<'a> !UnwindSafe for InfraContext<'a>
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more