Documentation ¶
Index ¶
- Constants
- Variables
- func BuildCertificateGenerateCommand(name string, ui cli.Ui) cli.CommandFactory
- func BuildRestApiCommand(name string, ui cli.Ui) cli.CommandFactory
- func BuildServiceInstallCommand(name string, ui cli.Ui) cli.CommandFactory
- func BuildServiceUninstallCommand(name string, ui cli.Ui) cli.CommandFactory
- func Commands(name string, ui cli.Ui) (cmds map[string]cli.CommandFactory)
- type CertificateGenerateCommand
- type Command
- type Config
- type ConfigFile
- type ForceExit
- type RestApiCommand
- type RestApiConfig
- type ServiceInstallCommand
- type ServiceInstallConfig
- type ServiceInstallConfigFile
- type ServiceUninstallCommand
Constants ¶
View Source
const DEFAULT_RESTAPI_PORT = 9922
View Source
const ENV_VAR_PREFIX = "VAGRANT_VMWARE_UTILITY_"
View Source
const RUNIT_DIR = "/etc/sv"
View Source
const RUNIT_TEMPLATE = `#!/bin/sh
exec %s api -config-file="%s"
`
Temlate for runit
string - exectuable path string - configuration path
View Source
const SYSTEMD_TEMPLATE = `` /* 174-byte string literal not displayed */
Temlate for systemd
string - exectuable path string - configuration path
View Source
const SYSV_PATH = "/etc/init.d/vagrant-vmware-utility"
View Source
const SYSV_TEMPLATE = `` /* 2406-byte string literal not displayed */
Template for init.d script
string - executable path string - configuration path
Variables ¶
View Source
var Shutdown sync.Cond
Functions ¶
func BuildCertificateGenerateCommand ¶
func BuildCertificateGenerateCommand(name string, ui cli.Ui) cli.CommandFactory
func BuildRestApiCommand ¶
func BuildRestApiCommand(name string, ui cli.Ui) cli.CommandFactory
func BuildServiceInstallCommand ¶
func BuildServiceInstallCommand(name string, ui cli.Ui) cli.CommandFactory
func BuildServiceUninstallCommand ¶
func BuildServiceUninstallCommand(name string, ui cli.Ui) cli.CommandFactory
Types ¶
type CertificateGenerateCommand ¶
type CertificateGenerateCommand struct {
Command
}
func (*CertificateGenerateCommand) Run ¶
func (c *CertificateGenerateCommand) Run(args []string) int
type Command ¶
type Command struct { DefaultConfig *Config Name string Flags *flag.FlagSet HelpText string SynopsisText string UI cli.Ui // contains filtered or unexported fields }
Base command stubs
type ConfigFile ¶
type ConfigFile struct { *Config `hcl:"core,block"` *RestApiConfig `hcl:"api,block"` *ServiceInstallConfig `hcl:"service,block"` }
type RestApiCommand ¶
type RestApiCommand struct { Command Config *RestApiConfig }
Command for starting the REST API
func (*RestApiCommand) Run ¶
func (c *RestApiCommand) Run(args []string) int
type RestApiConfig ¶
type ServiceInstallCommand ¶
type ServiceInstallCommand struct { Command Config *ServiceInstallConfig }
func (*ServiceInstallCommand) Run ¶
func (c *ServiceInstallCommand) Run(args []string) int
type ServiceInstallConfig ¶
type ServiceInstallConfig struct { Driver string LicenseOverride string Init string // used on linux (style) Port int64 RunitDir string // used on linux Print bool // used for init printing ExePath string // used for init printing ConfigPath string // used for init printing ConfigWrite string // used for init printing Pdriver *string `hcl:"driver"` PlicenseOverride *string `hcl:"license_override"` Pinit *string `hcl:"init"` // used on linux (style) PrunitDir *string `hcl:"runit_dir"` // used on linux Pport *int64 `hcl:"port"` }
func (*ServiceInstallConfig) Prepare ¶
func (s *ServiceInstallConfig) Prepare()
type ServiceInstallConfigFile ¶
type ServiceInstallConfigFile struct {
Service *ServiceInstallConfig `hcl:"service"`
}
This is used for when we want to write configuration out to a config file
func (*ServiceInstallConfigFile) Prepare ¶
func (s *ServiceInstallConfigFile) Prepare()
type ServiceUninstallCommand ¶
type ServiceUninstallCommand struct { Command Config *ServiceInstallConfig }
func (*ServiceUninstallCommand) Run ¶
func (c *ServiceUninstallCommand) Run(args []string) int
Click to show internal directories.
Click to hide internal directories.