1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
use PathBuf;
use ;
use core;
// use crate::modules::script::engine::FromLuaTable;
/// `KindConfig` is a struct that holds the configuration for the kind cluster.
/// - `version`: The version of the kind cluster to use.
/// - `config`: The optional path to the kind config file.
/// - `context`: The name of the kind cluster.
// impl FromLuaTable for KindConfig {
// fn from_lua(lua_table: Table<'_>, _ctx: Context<'_>) -> Result<Self, Err> {
// let version: Option<String> = lua_table.get("version").ok();
// let config: Option<String> = lua_table.get("config").ok();
// let context: Option<String> = lua_table.get("context").ok();
//
// let default = KindConfig::default();
//
// // Set default values if they are missing.
// let version = version.unwrap_or(default.version.to_string());
//
// Ok(Self { version, config, context })
// }
// }
/// `default` is a function that returns a default [`KindConfig`] struct.
/// The default [`KindConfig`] struct has the following values:
/// version: Default is "1.22.15"
/// config: None
/// context: "kind"
/// `start` is a function that starts a kind cluster by providing the [`KindConfig`] struct.