installers.sysadmintools.garage_s3 #
garage_s3
To get started
import freeflowuniverse.herolib.installers.something. garage_s3
mut installer:= garage_s3.get()!
installer.start()!
example heroscript
!!garage_s3.install
homedir: '/home/user/garage_s3'
username: 'admin'
password: 'secretpassword'
title: 'Some Title'
host: 'localhost'
port: 8888
Constants #
const version = '1.0.1'
fn delete #
fn delete(args_ ArgsGet) !
fn exists #
fn exists(args_ ArgsGet) !bool
does the config exists?
fn get #
fn get(args_ ArgsGet) !&GarageS3
fn heroscript_dumps #
fn heroscript_dumps(obj GarageS3) !string
fn heroscript_loads #
fn heroscript_loads(heroscript string) !GarageS3
fn play #
fn play(args_ PlayArgs) !
fn set #
fn set(o GarageS3) !
register the config for the future
fn switch #
fn switch(name string)
switch instance to be used for garage_s3
struct ArgsGet #
@[params]
struct ArgsGet {
pub mut:
name string
}
///////FACTORY
struct DefaultConfigArgs #
@[params]
struct DefaultConfigArgs {
instance string = 'default'
}
helpers
struct GarageS3 #
@[heap]
struct GarageS3 {
pub mut:
name string = 'default'
replication_mode string = '3'
config_path string = '/var/garage/config.toml'
metadata_dir string = '/var/garage/meta'
data_dir string = '/var/garage/data'
sled_cache_capacity u32 = 128 // in MB
compression_level u8 = 1
rpc_secret string //{GARAGE_RPCSECRET}
rpc_bind_addr string = '[::]:3901'
rpc_bind_outgoing bool
rpc_public_addr string = '127.0.0.1:3901'
bootstrap_peers []string
api_bind_addr string = '[::]:3900'
s3_region string = 'garage'
root_domain string = '.s3.garage'
web_bind_addr string = '[::]:3902'
web_root_domain string = '.web.garage'
admin_api_bind_addr string = '[::]:3903'
admin_metrics_token string //{GARAGE_METRICSTOKEN}
admin_token string //{GARAGE_ADMINTOKEN}
admin_trace_sink string = 'http://localhost:4317'
reset bool
config_reset bool
start bool = true
restart bool = true
}
THIS THE THE SOURCE OF THE INFORMATION OF THIS FILE, HERE WE HAVE THE CONFIG OBJECT CONFIGURED AND MODELLED
fn (GarageS3) destroy #
fn (mut self GarageS3) destroy() !
fn (GarageS3) install #
fn (mut self GarageS3) install(args InstallArgs) !
fn (GarageS3) install_start #
fn (mut self GarageS3) install_start(args InstallArgs) !
fn (GarageS3) reload #
fn (mut self GarageS3) reload() !
load from disk and make sure is properly intialized
fn (GarageS3) restart #
fn (mut self GarageS3) restart() !
fn (GarageS3) running #
fn (mut self GarageS3) running() !bool
fn (GarageS3) start #
fn (mut self GarageS3) start() !
fn (GarageS3) stop #
fn (mut self GarageS3) 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
}