debian-forge-composer/internal/osbuildexecutor/runner-impl-host.go
Michael Vogt aa3d70a429 osbuildexecutor: tweak RunOSBuild() signature and use opts
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`.
2024-06-14 15:02:08 +02:00

21 lines
484 B
Go

package osbuildexecutor
import (
"io"
"github.com/osbuild/images/pkg/osbuild"
)
type hostExecutor struct{}
func (he *hostExecutor) RunOSBuild(manifest []byte, opts *OsbuildOpts, errorWriter io.Writer) (*osbuild.Result, error) {
if opts == nil {
opts = &OsbuildOpts{}
}
return osbuild.RunOSBuild(manifest, opts.StoreDir, opts.OutputDir, opts.Exports, opts.Checkpoints, opts.ExtraEnv, opts.Result, errorWriter)
}
func NewHostExecutor() Executor {
return &hostExecutor{}
}