Expand description
Port of internal/cluster/external/driver.go: a super::Driver
implementation that adopts an already-running Kubernetes cluster through
an existing kubeconfig context, rather than provisioning one.
Executor injection. The Go original reaches its CommandRunner
through an ambient context.Context (executor.FromContext(ctx))
threaded through every method call. Every super::Driver method in
this crate has no context parameter at all (see mock.rs), so rather
than route through xianyun_executor::exec::context (a sibling crate’s
concern, and a different shape than this trait’s method signatures),
this driver takes its Arc<dyn CommandRunner + Send + Sync> once, at
construction, and stores it as a field. Tests inject
xianyun_testutil::MockCommandRunner the same way.
Structs§
- Driver
- Port of
external.Driver. - Kubectl
Version - Port of
external.kubectlVersion, the JSON shape ofkubectl version -o json. - Server
Version - Port of the nested
serverVersionobject inkubectlVersion.
Enums§
- External
Error - Port of
external.ErrClusterUnreachable,ErrCannotStopExternal, andErrCannotDestroyExternal.
Constants§
Functions§
- first_
line - Port of
external.firstLine.