Documentation ¶
Index ¶
- func AtomicallyWriteFile(path string, mode os.FileMode, writeFileFunc func(*os.File) error) error
- func ParsePackagesJSON(rd io.Reader) (map[string]string, error)
- func RunCommand(ctx context.Context, name string, arg ...string) ([]byte, []byte, error)
- func RunWithDeadline(ctx context.Context, deadline time.Time, f func() error) error
- func RunWithTimeout(ctx context.Context, timeout time.Duration, f func() error) error
- func Untar(ctx context.Context, dst string, src string) error
- type PackageJSON
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AtomicallyWriteFile ¶
func ParsePackagesJSON ¶
ParsePackagesJSON parses an update package's packages.json file for the express purpose of returning a map of package names and variant keys to the package's Merkle root as a value. This mimics the behavior of the function that parsed the legacy "packages" file format.
func RunCommand ¶
RunCommand executes a command on the host and returns the stdout and stderr as byte strings.
func RunWithDeadline ¶
RunWithDeadline runs a closure to runs the closure in a goroutine
func RunWithTimeout ¶
RunWithTimeout runs a closure to completion, or returns an error if it times out.
Types ¶
type PackageJSON ¶
Click to show internal directories.
Click to hide internal directories.