tar

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package tar avoids third-party dependencies (ex archiver/v3) and are special-cased to the needs of func-e.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TarGz

func TarGz(dst, src string) error

TarGz tars and gzips "src", rooted at the last directory, into the file named "dst" Ex If "src" includes "/tmp/envoy/bin" and "/tmp/build/bin". If "src" is "/tmp/envoy", "dst" includes "envoy/bin".

This is used to compress the working directory of Envoy after it is stopped.

func Untar

func Untar(dst string, src io.Reader) error

Untar unarchives the compressed "src" which is either a "tar.xz" or "tar.gz" stream. This strips the base directory inside the "src" archive. Ex on "/foo/bar", "dst" will have "bar/**"

This is used to decompress Envoy distributions in the "tarballURL" field of "envoy-versions.json". To keep the binary size small, only supports compression formats used in practice. As of May 2021, all "tarballURL" from stable releases were "tar.xz".

func UntarAndVerify added in v0.7.0

func UntarAndVerify(dst string, src io.Reader, sha256Sum version.SHA256Sum) error

UntarAndVerify is like Untar, except it errors if the stream has a different signature than the given SHA-256.

Types

This section is empty.

Jump to

Keyboard shortcuts

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