Expand description
Port of internal/cluster/k3d/driver.go and internal/cluster/k3d/ports.go:
a super::Driver implementation using k3d as the backend.
This is the second highest-churn driver file in the Go codebase (51
commits per VCS hotspot analysis, the highest of all), so its tests are
ported with extra care for edge cases in tests/k3d_driver.rs and
tests/k3d_ports.rs.
Executor injection. Following the pattern established by
external::Driver and colima::Driver (see their module doc
comments), this driver takes its Arc<dyn CommandRunner + Send + Sync>
at construction rather than through an ambient context. Driver::new
wires in the real xianyun_executor::exec::Client so existing callers
(driver::auto) need no change; Driver::with_runner is the
test-facing constructor.
docker.Backend. The Go constructor also takes an injected
docker.Backend and panics if it’s nil, but nothing in driver.go or
ports.go ever calls a method on it – grepping the Go source for
d.docker or .docker. turns up nothing beyond the field assignment
in NewDriver. xianyun-backends::docker is also still a stub crate
(see PORT_NOTES.md), so this port omits the parameter entirely rather
than carry a genuinely dead field forward.
Structs§
- Driver
- Port of
k3d.Driver. - K3dCluster
- Port of
k3d.k3dCluster, the JSON shape ofk3d cluster list -o json. - K3dNode
- Port of
k3d.k3dNode. - K3dNode
Ip - Port of
k3d.k3dNodeIP. - K3dNode
State - Port of
k3d.k3dNodeState. - Port
Mapping - Port of
k3d.portMapping: a singlek3d cluster create -pspec, parsed once when it enters the driver and passed around in that form.
Constants§
Functions§
- build_
cluster_ create_ args - Port of
(*k3d.Driver).buildClusterCreateArgs. - check_
port_ conflicts - Port of
(*k3d.Driver).checkPortConflicts. - host_ip
- Port of
k3d.hostIP. - is_
k3d_ available - Port of
(*k3d.Driver).isK3dAvailable. - merge_
port_ mappings - Port of
k3d.mergePortMappings. - node_ip
- Port of
k3d.nodeIP. - node_
version - Port of
k3d.nodeVersion. - parse_
port_ mapping - Port of
k3d.parsePortMapping. - parse_
port_ mappings - Port of
k3d.parsePortMappings. - probe_
address - Port of
k3d.probeAddress(the seamDriver.portInUseis stubbed by tests): dialsaddressover TCP and reports whether a listener answered. - verify_
config - Port of
(*k3d.Driver).verifyConfig. - warn_
deprecated_ disable_ args - Port of
k3d.warnDeprecatedDisableArgs.