installers.sysadmintools.s3 #
S3
Constants #
const version = '0.0.0'
fn build_ #
fn build_(args BuildArgs) !
install s3cas will return true if it was already installed
fn get #
fn get(args_ ArgsGet) !&S3Installer
fn install_ #
fn install_() !
install s3 will return true if it was already installed
fn new #
fn new(args_ Config) !Server
get the s3 server
fs_root string = '/var/data/s3'
host string = 'localhost'
meta_root string = '/var/data/s3_meta'
metric_host string
metric_port int //9100
port int = 8014
access_key string @[required]
secret_key string
if name exists already in the config DB, it will load for that name
fn play #
fn play(args_ PlayArgs) !
fn switch #
fn switch(name string)
switch instance to be used for s3
struct ArgsGet #
@[params]
struct ArgsGet {
pub mut:
name string
}
///////FACTORY
struct BuildArgs #
@[params]
struct BuildArgs {
pub mut:
reset bool
// bin_push bool = true
}
struct Config #
@[params]
struct Config {
pub mut:
name string = 'default'
fs_root string = '/var/data/s3'
host string = 'localhost'
meta_root string = '/var/data/s3_meta'
metric_host string = 'localhost'
metric_port int = 9100
port int = 8014
access_key string
secret_key string
}
--fs-root
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 S3Installer #
@[heap]
struct S3Installer {
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 (S3Installer) build #
fn (mut self S3Installer) build() !
fn (S3Installer) destroy #
fn (mut self S3Installer) destroy() !
fn (S3Installer) install #
fn (mut self S3Installer) install(args InstallArgs) !
fn (S3Installer) install_start #
fn (mut self S3Installer) install_start(args InstallArgs) !
fn (S3Installer) restart #
fn (mut self S3Installer) restart() !
fn (S3Installer) running #
fn (mut self S3Installer) running() !bool
fn (S3Installer) start #
fn (mut self S3Installer) start() !
fn (S3Installer) stop #
fn (mut self S3Installer) stop() !
struct Server #
struct Server {
pub mut:
name string
config Config
process ?zinit.ZProcess
}
fn (Server) start #
fn (mut server Server) start() !
fn (Server) status #
fn (mut server Server) status() !zinit.ZProcessStatus
return status
pub enum ZProcessStatus {
unknown
init
ok
error
blocked
spawned
}
fn (Server) check #
fn (mut server Server) check() !
will check if running
fn (Server) stop #
fn (mut server Server) stop() !