Skip to content

installers.net.yggdrasil #

yggdrasil

To get started



import freeflowuniverse.herolib.installers.something.yggdrasil as yggdrasil_installer

heroscript:='
!!yggdrasil.configure name:'test'
    password: '1234'
    port: 7701

!!yggdrasil.start name:'test' reset:1 
'

yggdrasil_installer.play(heroscript=heroscript)!

//or we can call the default and do a start with reset
//mut installer:= yggdrasil_installer.get()!
//installer.start(reset:true)!

example heroscript

!!yggdrasil.configure
    homedir: '/home/user/yggdrasil'
    username: 'admin'
    password: 'secretpassword'
    title: 'Some Title'
    host: 'localhost'
    port: 8888

Constants #

const version = '0.0.0'

fn get #

fn get(args_ ArgsGet) !&YggdrasilInstaller

fn install #

fn install(args_ InstallArgs) !

install yggdrasil will return true if it was already installed

fn play #

fn play(args_ PlayArgs) !

fn restart #

fn restart() !

fn running_ #

fn running_() !bool

fn start #

fn start() !

fn switch #

fn switch(name string)

switch instance to be used for yggdrasil

struct ArgsGet #

@[params]
struct ArgsGet {
pub mut:
	name string
}

///////FACTORY

struct DefaultConfigArgs #

@[params]
struct DefaultConfigArgs {
	instance string = 'default'
}

helpers

struct InstallArgs #

@[params]
struct InstallArgs {
pub mut:
	reset bool
}

struct PlayArgs #

@[params]
struct PlayArgs {
pub mut:
	heroscript string // if filled in then plbook will be made out of it
	plbook     ?playbook.PlayBook
	reset      bool
}

struct YggdrasilInstaller #

@[heap]
struct YggdrasilInstaller {
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 (YggdrasilInstaller) build #

fn (mut self YggdrasilInstaller) build() !

fn (YggdrasilInstaller) destroy #

fn (mut self YggdrasilInstaller) destroy() !

fn (YggdrasilInstaller) install #

fn (mut self YggdrasilInstaller) install(args InstallArgs) !

fn (YggdrasilInstaller) install_start #

fn (mut self YggdrasilInstaller) install_start(args InstallArgs) !

fn (YggdrasilInstaller) restart #

fn (mut self YggdrasilInstaller) restart() !

fn (YggdrasilInstaller) running #

fn (mut self YggdrasilInstaller) running() !bool

fn (YggdrasilInstaller) start #

fn (mut self YggdrasilInstaller) start() !

fn (YggdrasilInstaller) stop #

fn (mut self YggdrasilInstaller) stop() !