diff options
Diffstat (limited to 'executor/executor_basic.go')
-rw-r--r-- | executor/executor_basic.go | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/executor/executor_basic.go b/executor/executor_basic.go new file mode 100644 index 0000000..ad42792 --- /dev/null +++ b/executor/executor_basic.go @@ -0,0 +1,33 @@ +//go:build !linux + +package executor + +import ( + "os/exec" + + hclog "github.com/hashicorp/go-hclog" + "github.com/hashicorp/nomad/client/lib/resources" + "github.com/hashicorp/nomad/plugins/drivers" +) + +func NewExecutorWithIsolation(logger hclog.Logger) Executor { + logger = logger.Named("executor") + logger.Error("isolation executor is not supported on this platform, using default") + return NewExecutor(logger) +} + +func (e *UniversalExecutor) configureResourceContainer(_ int) error { return nil } + +func (e *UniversalExecutor) getAllPids() (resources.PIDs, error) { + return getAllPidsByScanning() +} + +func (e *UniversalExecutor) start(command *ExecCommand) error { + return e.childCmd.Start() +} + +func withNetworkIsolation(f func() error, _ *drivers.NetworkIsolationSpec) error { + return f() +} + +func setCmdUser(*exec.Cmd, string) error { return nil } |