executor_nolinux.go 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. //go:build !linux
  2. package buildkit
  3. import (
  4. "context"
  5. "errors"
  6. "runtime"
  7. "github.com/docker/docker/daemon/config"
  8. "github.com/docker/docker/libnetwork"
  9. "github.com/docker/docker/pkg/idtools"
  10. "github.com/moby/buildkit/executor"
  11. "github.com/moby/buildkit/executor/oci"
  12. resourcetypes "github.com/moby/buildkit/executor/resources/types"
  13. )
  14. func newExecutor(_, _ string, _ *libnetwork.Controller, _ *oci.DNSConfig, _ bool, _ idtools.IdentityMapping, _ string) (executor.Executor, error) {
  15. return &stubExecutor{}, nil
  16. }
  17. type stubExecutor struct{}
  18. func (w *stubExecutor) Run(ctx context.Context, id string, root executor.Mount, mounts []executor.Mount, process executor.ProcessInfo, started chan<- struct{}) (resourcetypes.Recorder, error) {
  19. return nil, errors.New("buildkit executor not implemented for "+runtime.GOOS)
  20. }
  21. func (w *stubExecutor) Exec(ctx context.Context, id string, process executor.ProcessInfo) error {
  22. return errors.New("buildkit executor not implemented for "+runtime.GOOS)
  23. }
  24. func getDNSConfig(config.DNSConfig) *oci.DNSConfig {
  25. return nil
  26. }