Documentation
¶
Index ¶
Constants ¶
View Source
const ( VERSION = "0.16.2" SERVER_PORT = ":1757" MIST_PORT = ":1445" LOGTAP_PORT = ":6361" )
Variables ¶
View Source
var ( // AppDir string // the path to the application (~/.nanobox/apps/<app>) AppsDir string // ~/.nanobox/apps 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's root directory path (~/.nanobox) UpdateFile string // the path to the .update file (~/.nanobox/.update) // 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 // Devmode bool // Force bool // Verbose bool // Silent bool // LogLevel string // // Exit exiter = os.Exit )
View Source
var ( Console *lumber.ConsoleLogger Log *lumber.FileLogger )
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, debug bool) Info(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 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 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 }
NanofileConfig represents all available/expected .nanofile configurable options
type VMfileConfig ¶
type VMfileConfig struct { Deployed bool // was the most recent deploy successufl Mode string // foreground/background Status string // the current staus of the VM Suspendable bool // is the VM able to be suspended }
VMfileConfig represents all available/expected .vmfile configurable options
func (*VMfileConfig) DeployedIs ¶
func (c *VMfileConfig) DeployedIs(deployed bool)
func (*VMfileConfig) HasDeployed ¶
func (c *VMfileConfig) HasDeployed() bool
func (*VMfileConfig) IsMode ¶
func (c *VMfileConfig) IsMode(mode string) bool
func (*VMfileConfig) IsSuspendable ¶
func (c *VMfileConfig) IsSuspendable() bool
func (*VMfileConfig) ModeIs ¶
func (c *VMfileConfig) ModeIs(mode string)
func (*VMfileConfig) SuspendableIs ¶
func (c *VMfileConfig) SuspendableIs(suspendable bool)
Click to show internal directories.
Click to hide internal directories.