mirror of
https://github.com/mudler/luet.git
synced 2025-08-02 07:59:22 +00:00
Consume CompilerBackend in Compiler
This commit is contained in:
parent
add0021cfd
commit
b62966ca35
@ -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
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user