Skip to main content

Module external

Module external 

Source
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.
KubectlVersion
Port of external.kubectlVersion, the JSON shape of kubectl version -o json.
ServerVersion
Port of the nested serverVersion object in kubectlVersion.

Enums§

ExternalError
Port of external.ErrClusterUnreachable, ErrCannotStopExternal, and ErrCannotDestroyExternal.

Constants§

DRIVER_NAME

Functions§

first_line
Port of external.firstLine.