Add package compression type

TODO: Handle the path substitution in a separate field
Adds GZip support and allows the compiler to switch compression type.

It also adds Concurrency as a compiler attribute (not consumed yet)

Refers to #33
This commit is contained in:
Ettore Di Giacinto
2019-12-30 12:53:32 +01:00
parent bb98259a48
commit d2d72c3fc4
4 changed files with 121 additions and 19 deletions

View File

@@ -25,7 +25,7 @@ type Compiler interface {
CompileParallel(concurrency int, keepPermissions bool, ps CompilationSpecs) ([]Artifact, []error)
CompileWithReverseDeps(concurrency int, keepPermissions bool, ps CompilationSpecs) ([]Artifact, []error)
ComputeDepTree(p CompilationSpec) (solver.PackagesAssertions, error)
SetConcurrency(i int)
FromPackage(pkg.Package) (CompilationSpec, error)
SetBackend(CompilerBackend)
@@ -63,7 +63,8 @@ type Artifact interface {
GetCompileSpec() CompilationSpec
WriteYaml(dst string) error
Unpack(dst string, keepPerms bool) error
Compress(src string) error
Compress(src string, concurrency int) error
SetCompressionType(t CompressionImplementation)
FileList() ([]string, error)
Hash() error
Verify() error