Documentation ¶
Index ¶
- Variables
- func AddCliNameMapping(cliName string, targetCliName string)
- func AddCliSearchPaths(cliName string, searchPaths ...string)
- func IsAdmin() (bool, error)
- func LookupFilePathInSystem(fileName string) (string, error)
- func RunAsAdmin(outputBuffer, errorBuffer io.Writer) error
- func RunAsAdminWithArgs(cmdArgs []string, outputBuffer, errorBuffer io.Writer) error
- func TerminateProcess(psRE string, outputBuffer, errorBuffer io.Writer) error
- type CLI
Constants ¶
This section is empty.
Variables ¶
View Source
var HandleInterruptEvent = func(handler func() bool) error { return nil }
os specific interrupt handler where additional handling is required to trap ctrl-c events. does nothing for *nix platforms. handler should return true if event is handled and propagation to other handlers in chaing should stop.
Functions ¶
func AddCliNameMapping ¶
hook to transform a cli name to a system local specific name. i.e. a binary named foo in linux maybe name foo.exe in windows.
func AddCliSearchPaths ¶
hook to provide a list of paths to refer for the cli binary before attempting to locate it in the system path
func LookupFilePathInSystem ¶
looks for the given file within the system path as set in the environment
func RunAsAdmin ¶
func RunAsAdminWithArgs ¶
Types ¶
type CLI ¶
type CLI interface { ExecutablePath() string WorkingDirectory() string ApplyFilter(filter *streams.Filter) GetPipedOutputBuffer() io.Reader GetPipedErrorBuffer() io.Reader Run(args []string) error RunWithEnv(args []string, extraEnvVars []string) error Start(args []string) error StartWithEnv(args []string, extraEnvVars []string) error Wait(timeout ...time.Duration) error Stop(timeout ...time.Duration) error }
Click to show internal directories.
Click to hide internal directories.