installers.sysadmintools.garage_s3 #
garage_s3
To get started
import incubaid.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 list #
fn list(args ArgsList) ![]&GarageS3
if fromdb set: load from filesystem, and not from mem, will also reset what is in mem
fn new #
fn new(args ArgsGet) !&GarageS3
fn play #
fn play(mut plbook PlayBook) !
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 = 'default'
fromdb bool // will load from filesystem
create bool // default will not create if not exist
}
///////FACTORY
struct ArgsList #
@[params]
struct ArgsList {
pub mut:
fromdb bool // will load from filesystem
}
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
}