Skip to content

installers.sysadmintools.s3 #

S3

fn build #

fn build(args BuildArgs) !

install s3cas will return true if it was already installed

fn get #

fn get(name_ string) !Server

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

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 [default: .] --host [default: localhost] --meta-root [default: .] --metric-host [default: localhost] --metric-port [default: 9100] --port [default: 8014] --access-key --secret-key

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() !