Documentation ¶
Index ¶
- Constants
- Variables
- func Debug(msg string)
- func Error(msg, err string)
- func Fatal(msg, err string)
- func ParseConfig(path string, v interface{}) error
- type BoxfileConfig
- type Config
- type NanofileConfig
- type VMfileConfig
- func (c *VMfileConfig) BackgroundIs(background bool)
- func (c *VMfileConfig) DeployedIs(deployed bool)
- func (c *VMfileConfig) HasDeployed() bool
- func (c *VMfileConfig) HasReloaded() bool
- func (c *VMfileConfig) IsBackground() bool
- func (c *VMfileConfig) IsSuspendable() bool
- func (c *VMfileConfig) ReloadedIs(reloaded bool)
- func (c *VMfileConfig) SuspendableIs(suspendable bool)
Constants ¶
View Source
const ( OS = runtime.GOOS ARCH = runtime.GOARCH LOGTAP_PORT = ":6361" MIST_PORT = ":1445" SERVER_PORT = ":1757" VERSION = "0.17.1" )
Variables ¶
View Source
var ( // AppDir string // ~/.nanobox/apps/<app>; the path to the application AppsDir string // ~/.nanobox/apps; the path where 'apps' are stored CWDir string // the current working directory EnginesDir string // ~/.nanobox/engines Home string // the users home directory (~) IP string // the guest vm's private network ip (generated from app name) Root string // ~/.nanobox; nanobox's root directory path TmpDir string // ~/.nanobox/tmp; a place to put downloads before moving them UpdateFile string // ~/.nanobox/.update; the path to the .update file // Nanofile NanofileConfig // parsed nanofile options VMfile VMfileConfig // parsed nanofile options // ServerURI string // nanobox-server host:port combo (IP:1757) ServerURL string // nanobox-server host:port combo (IP:1757) (http) MistURI string // mist's host:port combo (IP:1445) LogtapURI string // logtap's host:port combo (IP:6361) // flags Background bool // don't suspend the vm on exit Devmode bool // run nanobox in devmode Force bool // force a command to run (effects very per command) LogLevel string // Silent bool // silence all ouput Verbose bool // run cli with log level "debug" // Exit exiter = os.Exit )
View Source
var ( Console *lumber.ConsoleLogger Log *lumber.FileLogger LogFile string )
Functions ¶
Types ¶
type BoxfileConfig ¶
type BoxfileConfig struct { Build struct { Engine string `json:"engine"` } }
BoxfileConfig represents all available/expected Boxfile configurable options
type Config ¶
type Config interface { Fatal(string, string) Root() string ParseConfig(path string, v interface{}) error Debug(msg string) Error(msg, err string) ParseNanofile() NanofileConfig ParseVMfile() VMfileConfig }
var (
Default Config = config{}
)
type NanofileConfig ¶
type NanofileConfig struct { CPUCap int `json:"cpu_cap"` // max %CPU usage allowed to the guest vm CPUs int `json:"cpus"` // number of CPUs to dedicate to the guest vm DevConfig string `json:"dev_config"` // the type of dev environment to configure on the guest vm Domain string `json:"domain"` // the domain to use in conjuntion with the ip when accesing the guest vm (defaults to <Name>.dev) IP string `json:"ip"` // the ip added to the /etc/hosts file for accessing the guest vm MountNFS bool `json:"mount_nfs"` // does the code directory get mounted as NFS Name string `json:"name"` // the name given to the project (defaults to cwd) Provider string `json:"provider"` // guest vm provider (virtual box, vmware, etc) RAM int `json:"ram"` // ammount of RAM to dedicate to the guest vm HostDNS string `json:"host_dns"` // use the hosts dns resolver SshPath string `json:"ssh_path"` // provide the path to the .ssh directory (if any) }
NanofileConfig represents all available/expected .nanofile configurable options
type VMfileConfig ¶
type VMfileConfig struct { Background bool // is the CLI running in "background" mode Deployed bool // was the most recent deploy successufl Reloaded bool // did the previous CLI command cause a 'reload' Suspendable bool // is the VM able to be suspended }
VMfileConfig represents all available/expected .vmfile configurable options
func (*VMfileConfig) BackgroundIs ¶ added in v0.16.6
func (c *VMfileConfig) BackgroundIs(background bool)
func (*VMfileConfig) DeployedIs ¶
func (c *VMfileConfig) DeployedIs(deployed bool)
func (*VMfileConfig) HasDeployed ¶
func (c *VMfileConfig) HasDeployed() bool
func (*VMfileConfig) HasReloaded ¶ added in v0.16.6
func (c *VMfileConfig) HasReloaded() bool
func (*VMfileConfig) IsBackground ¶ added in v0.16.6
func (c *VMfileConfig) IsBackground() bool
func (*VMfileConfig) IsSuspendable ¶
func (c *VMfileConfig) IsSuspendable() bool
func (*VMfileConfig) ReloadedIs ¶ added in v0.16.6
func (c *VMfileConfig) ReloadedIs(reloaded bool)
func (*VMfileConfig) SuspendableIs ¶
func (c *VMfileConfig) SuspendableIs(suspendable bool)
Click to show internal directories.
Click to hide internal directories.