Versions in this module Expand all Collapse all v0 v0.0.2 Aug 14, 2019 v0.0.1 Aug 14, 2019 Changes in this version + func CalculateNetworkAndBroadcast(ipAddress, netmask string) (network, broadcast string, err error) + func NewExecProcess(cmd *exec.Cmd, keepAttached bool, quiet bool, logger boshlog.Logger) *execProcess + type CmdRunner interface + CommandExists func(cmdName string) (exists bool) + RunCommand func(cmdName string, args ...string) (stdout, stderr string, exitStatus int, err error) + RunCommandQuietly func(cmdName string, args ...string) (stdout, stderr string, exitStatus int, err error) + RunCommandWithInput func(input, cmdName string, args ...string) (stdout, stderr string, exitStatus int, err error) + RunComplexCommand func(cmd Command) (stdout, stderr string, exitStatus int, err error) + RunComplexCommandAsync func(cmd Command) (Process, error) + func NewExecCmdRunner(logger boshlog.Logger) CmdRunner + type Command struct + Args []string + Env map[string]string + KeepAttached bool + Name string + Quiet bool + Stderr io.Writer + Stdin io.Reader + Stdout io.Writer + UseIsolatedEnv bool + WorkingDir string + type ConvergeFileContentsOpts struct + DryRun bool + type ExecError struct + Command string + StdErr string + StdOut string + func NewExecError(cmd, stdout, stderr string) ExecError + func (e ExecError) Error() string + func (e ExecError) ShortError() string + type File interface + Name func() string + ReadAt func([]byte, int64) (int, error) + Seek func(int64, int) (int64, error) + Stat func() (os.FileInfo, error) + WriteAt func([]byte, int64) (int, error) + type FileSystem interface + ChangeTempRoot func(path string) error + Chmod func(path string, perm os.FileMode) error + Chown func(path, username string) error + ConvergeFileContents func(path string, content []byte, opts ...ConvergeFileContentsOpts) (written bool, err error) + CopyDir func(srcPath, dstPath string) error + CopyFile func(srcPath, dstPath string) error + ExpandPath func(path string) (expandedPath string, err error) + FileExists func(path string) bool + Glob func(pattern string) (matches []string, err error) + HomeDir func(username string) (path string, err error) + Lstat func(path string) (os.FileInfo, error) + MkdirAll func(path string, perm os.FileMode) error + OpenFile func(path string, flag int, perm os.FileMode) (File, error) + ReadAndFollowLink func(symlinkPath string) (targetPath string, err error) + ReadFile func(path string) (content []byte, err error) + ReadFileString func(path string) (content string, err error) + ReadFileWithOpts func(path string, opts ReadOpts) (content []byte, err error) + Readlink func(symlinkPath string) (targetPath string, err error) + RecursiveGlob func(pattern string) (matches []string, err error) + RemoveAll func(fileOrDir string) error + Rename func(oldPath, newPath string) error + Stat func(path string) (os.FileInfo, error) + StatWithOpts func(path string, opts StatOpts) (os.FileInfo, error) + Symlink func(oldPath, newPath string) error + TempDir func(prefix string) (path string, err error) + TempFile func(prefix string) (file File, err error) + Walk func(root string, walkFunc filepath.WalkFunc) error + WriteFile func(path string, content []byte) error + WriteFileQuietly func(path string, content []byte) error + WriteFileString func(path, content string) error + func NewOsFileSystem(logger boshlog.Logger) FileSystem + func NewOsFileSystemWithStrictTempRoot(logger boshlog.Logger) FileSystem + type Process interface + TerminateNicely func(killGracePeriod time.Duration) error + Wait func() <-chan Result + type ReadOpts struct + Quiet bool + type Result struct + Error error + ExitStatus int + Stderr string + Stdout string + type StatOpts struct + Quiet bool