command

package
v0.0.0-...-c104d87 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

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

func Commands

func Commands(name string, ui cli.Ui) (cmds map[string]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

func (*Command) Help

func (c *Command) Help() string

func (*Command) Run

func (c *Command) Run(args []string) int

func (*Command) Synopsis

func (c *Command) Synopsis() string

type Config

type Config struct {
	Debug     bool
	Level     string
	LogFile   string
	LogAppend bool

	Pdebug     *bool   `hcl:"debug"`
	Plevel     *string `hcl:"level"`
	PlogFile   *string `hcl:"log_file"`
	PlogAppend *bool   `hcl:"log_append"`
	// contains filtered or unexported fields
}

type ConfigFile

type ConfigFile struct {
	*Config               `hcl:"core,block"`
	*RestApiConfig        `hcl:"api,block"`
	*ServiceInstallConfig `hcl:"service,block"`
}

type ForceExit

type ForceExit struct {
	ExitCode int
}

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 RestApiConfig struct {
	Port                   int64
	Driver                 string
	InternalPortForwarding bool
	LicenseOverride        string
	LogDisplay             bool

	Pport                   *int64  `hcl:"port"`
	Pdriver                 *string `hcl:"driver"`
	PinternalPortForwarding *bool   `hcl:"internal_port_forwarding"`
	PlicenseOverride        *string `hcl:"license_override"`
}

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

Jump to

Keyboard shortcuts

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