osbuildexecutor: introduce osbuildexecutor.Executor interface

Wrap the current osbuildexecutor.Executor in an interface so it's easier
to add different executors, which for instance can run osbuild in a VM.
This commit is contained in:
Sanne Raymaekers 2024-01-25 16:32:28 +01:00
parent 9e85050633
commit e10424de2f
4 changed files with 51 additions and 3 deletions

View file

@ -0,0 +1,11 @@
package osbuildexecutor
import (
"io"
"github.com/osbuild/images/pkg/osbuild"
)
type Executor interface {
RunOSBuild(manifest []byte, store, outputDirectory string, exports, checkpoints, extraEnv []string, result bool, errorWriter io.Writer) (*osbuild.Result, error)
}