pub fn load_config(
ctx: &Context,
connect: Connector,
) -> Result<(Container, Option<ResolveError>)>Expand description
Port of ca.loadConfig: loads the config and resolves the cluster DNS
domain when the cluster is running; the returned Option<ResolveError>
says why it was not asked, if it was not.
pub (not private) and parameterized over connect — mirroring
up::run_start’s KubectlFactory seam — because there is no Rust
equivalent of Go’s ambient-executor-through-context trick its own
tests use to intercept clusterdomain.ConnectKubectl’s kubectl
calls without a live cluster; xianyun_core::config::global::Context
(config) and xianyun_executor::exec::context::Context (subprocess
execution) are two different, unconnected context types in this port.
Tests inject a fake Connector here instead.