Documentation ¶
Overview ¶
Package generic provides the generic packge installation. It does not care about the real package mananger. Because It will accept arbitrary command line.
Index ¶
- type CmdWithArgs
- type CommonInstaller
- func (d *CommonInstaller) Available() (ok bool)
- func (d *CommonInstaller) Install() (err error)
- func (d *CommonInstaller) SetURLReplace(data map[string]string)
- func (d *CommonInstaller) Start() error
- func (d *CommonInstaller) Stop() error
- func (d *CommonInstaller) Uninstall() (err error)
- func (d *CommonInstaller) WaitForStart() (ok bool, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CmdWithArgs ¶
type CmdWithArgs struct { Cmd string `yaml:"cmd"` Args []string `yaml:"args"` SystemCall bool `yaml:"systemCall"` Execer fakeruntime.Execer }
CmdWithArgs is a command and with args
func (CmdWithArgs) Run ¶ added in v0.0.67
func (c CmdWithArgs) Run() (err error)
Run runs the current command
type CommonInstaller ¶
type CommonInstaller struct { Name string OS string InstallCmd CmdWithArgs UninstallCmd CmdWithArgs Execer fakeruntime.Execer // contains filtered or unexported fields }
CommonInstaller is the installer of a common bash
func (*CommonInstaller) Available ¶
func (d *CommonInstaller) Available() (ok bool)
Available check if support current platform
func (*CommonInstaller) Install ¶
func (d *CommonInstaller) Install() (err error)
Install installs the target package
func (*CommonInstaller) SetURLReplace ¶ added in v0.0.71
func (d *CommonInstaller) SetURLReplace(data map[string]string)
SetURLReplace set the URL replace map
func (*CommonInstaller) Start ¶
func (d *CommonInstaller) Start() error
Start starts the desired service
func (*CommonInstaller) Stop ¶
func (d *CommonInstaller) Stop() error
Stop stops the desired service
func (*CommonInstaller) Uninstall ¶
func (d *CommonInstaller) Uninstall() (err error)
Uninstall uninstalls the target package
func (*CommonInstaller) WaitForStart ¶
func (d *CommonInstaller) WaitForStart() (ok bool, err error)
WaitForStart waits for the service be started
Click to show internal directories.
Click to hide internal directories.