config

package
v0.0.0-...-c76e7b4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Trace     bool     `arg:"env:TRACE" help:"Enable output of trace log of Sakura cloud API call"`
	Debug     bool     `arg:"env:DEBUG" help:"Enable output of debug level log"`
	FakeMode  string   `arg:"--fake-mode,env:FAKE_MODE" help:"File path to fetch/store fake data. If this flag is specified, enable fake-mode"`
	Token     string   `arg:"required,env:SAKURACLOUD_ACCESS_TOKEN" help:"Token for using the SakuraCloud API"`
	Secret    string   `arg:"required,env:SAKURACLOUD_ACCESS_TOKEN_SECRET" help:"Secret for using the SakuraCloud API"`
	Zones     []string `arg:"-"` // TODO zones parameter is not implements.
	WebAddr   string   `arg:"env:WEB_ADDR"`
	WebPath   string   `arg:"env:WEB_PATH"`
	RateLimit int      `arg:"env:SAKURACLOUD_RATE_LIMIT" help:"Rate limit per second for SakuraCloud API calls"`

	NoCollectorAutoBackup              bool `arg:"--no-collector.auto-backup" help:"Disable the AutoBackup collector"`
	NoCollectorBill                    bool `arg:"--no-collector.bill" help:"Disable the Bill collector"`
	NoCollectorCoupon                  bool `arg:"--no-collector.coupon" help:"Disable the Coupon collector"`
	NoCollectorDatabase                bool `arg:"--no-collector.database" help:"Disable the Database collector"`
	NoCollectorESME                    bool `arg:"--no-collector.esme" help:"Disable the ESME collector"`
	NoCollectorInternet                bool `arg:"--no-collector.internet" help:"Disable the Internet(Switch+Router) collector"`
	NoCollectorLoadBalancer            bool `arg:"--no-collector.load-balancer" help:"Disable the LoadBalancer collector"`
	NoCollectorLocalRouter             bool `arg:"--no-collector.local-router" help:"Disable the LocalRouter collector"`
	NoCollectorMobileGateway           bool `arg:"--no-collector.mobile-gateway" help:"Disable the MobileGateway collector"`
	NoCollectorNFS                     bool `arg:"--no-collector.nfs" help:"Disable the NFS collector"`
	NoCollectorProxyLB                 bool `arg:"--no-collector.proxy-lb" help:"Disable the ProxyLB(Enhanced LoadBalancer) collector"`
	NoCollectorServer                  bool `arg:"--no-collector.server" help:"Disable the Server collector"`
	NoCollectorServerExceptMaintenance bool `arg:"--no-collector.server.except-maintenance" help:"Disable the Server collector except for maintenance information"`
	NoCollectorSIM                     bool `arg:"--no-collector.sim" help:"Disable the SIM collector"`
	NoCollectorVPCRouter               bool `arg:"--no-collector.vpc-router" help:"Disable the VPCRouter collector"`
	NoCollectorZone                    bool `arg:"--no-collector.zone" help:"Disable the Zone collector"`
	NoCollectorWebAccel                bool `arg:"--no-collector.webaccel" help:"Disable the WebAccel collector"`
}

Config gets its content from env and passes it on to different packages

func InitConfig

func InitConfig() (Config, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL