Consume CompilerBackend in Compiler

This commit is contained in:
Ettore Di Giacinto 2019-11-04 17:20:00 +01:00
parent add0021cfd
commit b62966ca35
No known key found for this signature in database
GPG Key ID: 1ADA699B145A2D1C
2 changed files with 11 additions and 0 deletions

View File

@ -56,3 +56,11 @@ func (cs *LuetCompiler) FromPackage(p pkg.Package) (CompilationSpec, error) {
}
return NewLuetCompilationSpec(dat)
}
func (cs *LuetCompiler) GetBackend() CompilerBackend {
return cs.Backend
}
func (cs *LuetCompiler) SetBackend(b CompilerBackend) {
cs.Backend = b
}

View File

@ -20,6 +20,9 @@ import pkg "github.com/mudler/luet/pkg/package"
type Compiler interface {
Compile(CompilationSpec) (*Artifact, error)
FromPackage(pkg.Package) (CompilationSpec, error)
SetBackend(CompilerBackend)
GetBackend() CompilerBackend
}
type CompilerBackend interface {