installers.sysadmintools.grafana #
grafana
To get started
import freeflowuniverse.herolib.installers.something.grafana as grafana_installer
heroscript:='
!!grafana.configure name:'test'
password: '1234'
port: 7701
!!grafana.start name:'test' reset:1
'
grafana_installer.play(heroscript=heroscript)!
//or we can call the default and do a start with reset
//mut installer:= grafana_installer.get()!
//installer.start(reset:true)!
example heroscript
!!grafana.configure
homedir: '/home/user/grafana'
username: 'admin'
password: 'secretpassword'
title: 'Some Title'
host: 'localhost'
port: 8888
Constants #
const version = '0.0.0'
fn get #
fn get(args_ ArgsGet) !&Grafana
fn install #
fn install(args_ InstallArgs) !
fn play #
fn play(args_ PlayArgs) !
fn switch #
fn switch(name string)
switch instance to be used for grafana
struct ArgsGet #
@[params]
struct ArgsGet {
pub mut:
name string
}
///////FACTORY
struct DefaultConfigArgs #
@[params]
struct DefaultConfigArgs {
instance string = 'default'
}
helpers
struct Grafana #
@[heap]
struct Grafana {
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 (Grafana) build #
fn (mut self Grafana) build() !
fn (Grafana) destroy #
fn (mut self Grafana) destroy() !
fn (Grafana) install #
fn (mut self Grafana) install(args InstallArgs) !
fn (Grafana) install_start #
fn (mut self Grafana) install_start(args InstallArgs) !
fn (Grafana) restart #
fn (mut self Grafana) restart() !
fn (Grafana) running #
fn (mut self Grafana) running() !bool
fn (Grafana) start #
fn (mut self Grafana) start() !
fn (Grafana) stop #
fn (mut self Grafana) stop() !
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
}