github.com/hernad/nomad@v1.6.112/drivers/shared/executor/executor_basic.go (about) 1 // Copyright (c) HashiCorp, Inc. 2 // SPDX-License-Identifier: MPL-2.0 3 4 //go:build !linux 5 6 package executor 7 8 import ( 9 "os/exec" 10 11 hclog "github.com/hashicorp/go-hclog" 12 "github.com/hernad/nomad/client/lib/resources" 13 "github.com/hernad/nomad/plugins/drivers" 14 ) 15 16 func NewExecutorWithIsolation(logger hclog.Logger, cpuTotalTicks uint64) Executor { 17 logger = logger.Named("executor") 18 logger.Error("isolation executor is not supported on this platform, using default") 19 return NewExecutor(logger, cpuTotalTicks) 20 } 21 22 func (e *UniversalExecutor) configureResourceContainer(_ int) error { return nil } 23 24 func (e *UniversalExecutor) getAllPids() (resources.PIDs, error) { 25 return getAllPidsByScanning() 26 } 27 28 func (e *UniversalExecutor) start(command *ExecCommand) error { 29 return e.childCmd.Start() 30 } 31 32 func withNetworkIsolation(f func() error, _ *drivers.NetworkIsolationSpec) error { 33 return f() 34 } 35 36 func setCmdUser(*exec.Cmd, string) error { return nil }