2018-09-24 18:37:45 +00:00
|
|
|
// +build !linux
|
2016-02-02 22:36:11 +00:00
|
|
|
|
2016-02-05 00:03:17 +00:00
|
|
|
package executor
|
2016-02-02 22:36:11 +00:00
|
|
|
|
2018-12-05 16:03:56 +00:00
|
|
|
import (
|
|
|
|
hclog "github.com/hashicorp/go-hclog"
|
2019-09-30 15:50:22 +00:00
|
|
|
"github.com/hashicorp/nomad/plugins/drivers"
|
2018-12-05 16:03:56 +00:00
|
|
|
)
|
2016-05-25 21:58:32 +00:00
|
|
|
|
2018-12-07 02:33:20 +00:00
|
|
|
func NewExecutorWithIsolation(logger hclog.Logger) Executor {
|
2018-09-24 18:37:45 +00:00
|
|
|
logger = logger.Named("executor")
|
|
|
|
logger.Error("isolation executor is not supported on this platform, using default")
|
|
|
|
return NewExecutor(logger)
|
2016-02-03 02:54:04 +00:00
|
|
|
}
|
|
|
|
|
2018-09-24 18:37:45 +00:00
|
|
|
func (e *UniversalExecutor) configureResourceContainer(_ int) error { return nil }
|
2016-02-02 22:36:11 +00:00
|
|
|
|
2018-09-24 18:37:45 +00:00
|
|
|
func (e *UniversalExecutor) runAs(_ string) error { return nil }
|
2019-07-18 14:57:27 +00:00
|
|
|
|
|
|
|
func (e *UniversalExecutor) getAllPids() (map[int]*nomadPid, error) {
|
|
|
|
return getAllPidsByScanning()
|
|
|
|
}
|
2019-06-17 03:56:20 +00:00
|
|
|
|
|
|
|
func (e *UniversalExecutor) start(command *ExecCommand) error {
|
|
|
|
return e.childCmd.Start()
|
|
|
|
}
|
2019-09-30 15:50:22 +00:00
|
|
|
|
2019-10-01 01:38:31 +00:00
|
|
|
func withNetworkIsolation(f func() error, _ *drivers.NetworkIsolationSpec) error {
|
2019-09-30 15:50:22 +00:00
|
|
|
return f()
|
|
|
|
}
|