threefold.grid4.gridsimulator #
Grid Simulator
see ... for example
we can use use the play command to execute on it.
fn new #
fn new(args_ SimulatorArgs) !Simulator
fn play #
fn play(mut plbook PlayBook) !
fn simulator_get #
fn simulator_get(name string) !&Simulator
get sheet from global
fn simulator_set #
fn simulator_set(sim Simulator)
remember sheet in global
struct Simulator #
struct Simulator {
pub mut:
name string
sheet &spreadsheet.Sheet
params SimulatorArgs
nodes map[string]&cloudslices.Node
}
fn (Simulator) load #
fn (mut self Simulator) load() !
load the mdbook content from path or git
fn (Simulator) play #
fn (mut self Simulator) play(mut plbook PlayBook) !
struct SimulatorArgs #
@[params]
struct SimulatorArgs {
pub mut:
name string = 'default' // name of simulation
path string
git_url string
git_reset bool
git_pull bool
}