Documentation ¶
Index ¶
- Constants
- func ConfigFile() (string, error)
- func Sudoers() (string, error)
- func VDESock(name string) (string, error)
- type Network
- type NetworksConfig
- func (config *NetworksConfig) Check(name string) error
- func (config *NetworksConfig) LogFile(name, daemon, stream string) string
- func (config *NetworksConfig) MkdirCmd() string
- func (config *NetworksConfig) PIDFile(name, daemon string) string
- func (config *NetworksConfig) StartCmd(name, daemon string) string
- func (config *NetworksConfig) StopCmd(name, daemon string) string
- func (config *NetworksConfig) User(daemon string) (osutil.User, error)
- func (config *NetworksConfig) VDESock(name string) string
- func (config *NetworksConfig) Validate() error
- func (config *NetworksConfig) VerifySudoAccess(sudoersFile string) error
- type Paths
Constants ¶
View Source
const ( Switch = "switch" VMNet = "vmnet" )
View Source
const ( ModeHost = "host" ModeBridged = "bridged" )
Variables ¶
This section is empty.
Functions ¶
func ConfigFile ¶
Types ¶
type Network ¶
type Network struct { Mode string `yaml:"mode"` // "host", "shared", or "bridged" Interface string `yaml:"interface,omitempty"` // only used by "bridged" networks Gateway net.IP `yaml:"gateway,omitempty"` // only used by "host" and "shared" networks DHCPEnd net.IP `yaml:"dhcpEnd,omitempty"` // default: same as Gateway, last byte is 254 NetMask net.IP `yaml:"netmask,omitempty"` // default: 255.255.255.0 }
type NetworksConfig ¶
type NetworksConfig struct { Paths Paths `yaml:"paths"` Group string `yaml:"group,omitempty"` // default: "everyone" Networks map[string]Network `yaml:"networks"` }
func Config ¶
func Config() (NetworksConfig, error)
Config returns the network config from the _config/networks.yaml file.
func DefaultConfig ¶
func DefaultConfig() (NetworksConfig, error)
func (*NetworksConfig) Check ¶
func (config *NetworksConfig) Check(name string) error
func (*NetworksConfig) LogFile ¶
func (config *NetworksConfig) LogFile(name, daemon, stream string) string
func (*NetworksConfig) MkdirCmd ¶
func (config *NetworksConfig) MkdirCmd() string
func (*NetworksConfig) PIDFile ¶
func (config *NetworksConfig) PIDFile(name, daemon string) string
func (*NetworksConfig) StartCmd ¶
func (config *NetworksConfig) StartCmd(name, daemon string) string
func (*NetworksConfig) StopCmd ¶
func (config *NetworksConfig) StopCmd(name, daemon string) string
func (*NetworksConfig) User ¶
func (config *NetworksConfig) User(daemon string) (osutil.User, error)
func (*NetworksConfig) VDESock ¶
func (config *NetworksConfig) VDESock(name string) string
func (*NetworksConfig) Validate ¶
func (config *NetworksConfig) Validate() error
func (*NetworksConfig) VerifySudoAccess ¶
func (config *NetworksConfig) VerifySudoAccess(sudoersFile string) error
Click to show internal directories.
Click to hide internal directories.