Introduce a new OsbuildOpts struct to make the API a bit easier to extend and use in the packages. Also add a new `JobID` field in the `OsbuildOpts`.
24 lines
428 B
Go
24 lines
428 B
Go
package osbuildexecutor
|
|
|
|
import (
|
|
"io"
|
|
|
|
"github.com/osbuild/images/pkg/osbuild"
|
|
)
|
|
|
|
type OsbuildOpts struct {
|
|
StoreDir string
|
|
OutputDir string
|
|
Exports []string
|
|
ExportPaths []string
|
|
Checkpoints []string
|
|
ExtraEnv []string
|
|
Result bool
|
|
|
|
// not strict a osbuild opt
|
|
JobID string
|
|
}
|
|
|
|
type Executor interface {
|
|
RunOSBuild(manifest []byte, opts *OsbuildOpts, errorWriter io.Writer) (*osbuild.Result, error)
|
|
}
|