installers.virt.herorunner #
herorunner
To get started
import incubaid.herolib.installers.something.herorunner as herorunner_installer
heroscript:='
!!herorunner.configure name:'test'
password: '1234'
port: 7701
!!herorunner.start name:'test' reset:1
'
herorunner_installer.play(heroscript=heroscript)!
//or we can call the default and do a start with reset
//mut installer:= herorunner_installer.get()!
//installer.start(reset:true)!
example heroscript
!!herorunner.configure
homedir: '/home/user/herorunner'
username: 'admin'
password: 'secretpassword'
title: 'Some Title'
host: 'localhost'
port: 8888
Constants #
const version = '0.0.0'
fn get #
fn get(args ArgsGet) !&HeroRunner
fn heroscript_loads #
fn heroscript_loads(heroscript string) !HeroRunner
///////////NORMALLY NO NEED TO TOUCH
fn new #
fn new(args ArgsGet) !&HeroRunner
fn play #
fn play(mut plbook PlayBook) !
fn switch #
fn switch(name string)
switch instance to be used for herorunner
struct ArgsGet #
@[params]
struct ArgsGet {
pub mut:
name string = 'default'
}
///////FACTORY
struct HeroRunner #
@[heap]
struct HeroRunner {
pub mut:
name string = 'default'
}
THIS THE THE SOURCE OF THE INFORMATION OF THIS FILE, HERE WE HAVE THE CONFIG OBJECT CONFIGURED AND MODELLED
fn (HeroRunner) destroy #
fn (mut self HeroRunner) destroy() !
fn (HeroRunner) install #
fn (mut self HeroRunner) install(args InstallArgs) !
struct InstallArgs #
@[params]
struct InstallArgs {
pub mut:
reset bool
}
////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////# LIVE CYCLE MANAGEMENT FOR INSTALLERS /////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////