Versions in this module Expand all Collapse all v1 v1.6.107 Aug 12, 2023 Changes in this version + const ExecutorDefaultMaxPort + const ExecutorDefaultMinPort + const ExecutorVersionLatest + const ExecutorVersionPre0_9 + const IsolationModeHost + const IsolationModePrivate + var ExecutorBasicMeasuredCpuStats = []string + var ExecutorBasicMeasuredMemStats = []string + var ExecutorCgroupMeasuredCpuStats = []string — linux/amd64 + var ExecutorCgroupV1MeasuredMemStats = []string — linux/amd64 + var ExecutorCgroupV2MeasuredMemStats = []string — linux/amd64 + func ExecScript(ctx context.Context, dir string, env []string, attrs *syscall.SysProcAttr, ...) ([]byte, int, error) + func GetPluginMap(logger hclog.Logger, fsIsolation bool) map[string]plugin.Plugin + func IsolationMode(plugin, task string) string + func SupportedCaps(allowNetRaw bool) []string + type ExecCommand struct + Args []string + BasicProcessCgroup bool + Capabilities []string + Cmd string + Devices []*drivers.DeviceConfig + Env []string + ModeIPC string + ModePID string + Mounts []*drivers.MountConfig + NetworkIsolation *drivers.NetworkIsolationSpec + NoPivotRoot bool + ResourceLimits bool + Resources *drivers.Resources + StderrPath string + StdoutPath string + TaskDir string + User string + func (c *ExecCommand) Close() + func (c *ExecCommand) GetWriters() (stdout io.WriteCloser, stderr io.WriteCloser) + func (c *ExecCommand) SetWriters(out io.WriteCloser, err io.WriteCloser) + func (c *ExecCommand) Stderr() (io.WriteCloser, error) + func (c *ExecCommand) Stdout() (io.WriteCloser, error) + type Executor interface + Exec func(deadline time.Time, cmd string, args []string) ([]byte, int, error) + ExecStreaming func(ctx context.Context, cmd []string, tty bool, stream drivers.ExecTaskStream) error + Launch func(launchCmd *ExecCommand) (*ProcessState, error) + Shutdown func(signal string, gracePeriod time.Duration) error + Signal func(os.Signal) error + Stats func(context.Context, time.Duration) (<-chan *cstructs.TaskResourceUsage, error) + UpdateResources func(*drivers.Resources) error + Version func() (*ExecutorVersion, error) + Wait func(ctx context.Context) (*ProcessState, error) + func CreateExecutor(logger hclog.Logger, driverConfig *base.ClientDriverConfig, ...) (Executor, *plugin.Client, error) + func NewExecutor(logger hclog.Logger) Executor + func NewExecutorWithIsolation(logger hclog.Logger) Executor + func ReattachToExecutor(reattachConfig *plugin.ReattachConfig, logger hclog.Logger) (Executor, *plugin.Client, error) + type ExecutorConfig struct + FSIsolation bool + LogFile string + LogLevel string + type ExecutorPlugin struct + func (p *ExecutorPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) + func (p *ExecutorPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error + type ExecutorVersion struct + Version string + func (v *ExecutorVersion) GoString() string + type LibcontainerExecutor struct — linux/amd64 + func (l *LibcontainerExecutor) Exec(deadline time.Time, cmd string, args []string) ([]byte, int, error) + func (l *LibcontainerExecutor) ExecStreaming(ctx context.Context, cmd []string, tty bool, stream drivers.ExecTaskStream) error + func (l *LibcontainerExecutor) Launch(command *ExecCommand) (*ProcessState, error) + func (l *LibcontainerExecutor) Shutdown(signal string, grace time.Duration) error + func (l *LibcontainerExecutor) Signal(s os.Signal) error + func (l *LibcontainerExecutor) Stats(ctx context.Context, interval time.Duration) (<-chan *cstructs.TaskResourceUsage, error) + func (l *LibcontainerExecutor) UpdateResources(resources *drivers.Resources) error + func (l *LibcontainerExecutor) Version() (*ExecutorVersion, error) + func (l *LibcontainerExecutor) Wait(ctx context.Context) (*ProcessState, error) + type PluginReattachConfig struct + AddrName string + AddrNet string + Pid int + func NewPluginReattachConfig(c *plugin.ReattachConfig) *PluginReattachConfig + func (c *PluginReattachConfig) PluginConfig() *plugin.ReattachConfig + type ProcessState struct + ExitCode int + Pid int + Signal int + Time time.Time + type UniversalExecutor struct + func (e *UniversalExecutor) Exec(deadline time.Time, name string, args []string) ([]byte, int, error) + func (e *UniversalExecutor) ExecStreaming(ctx context.Context, command []string, tty bool, stream drivers.ExecTaskStream) error + func (e *UniversalExecutor) Launch(command *ExecCommand) (*ProcessState, error) + func (e *UniversalExecutor) Shutdown(signal string, grace time.Duration) error + func (e *UniversalExecutor) Signal(s os.Signal) error + func (e *UniversalExecutor) Stats(ctx context.Context, interval time.Duration) (<-chan *cstructs.TaskResourceUsage, error) + func (e *UniversalExecutor) UpdateResources(resources *drivers.Resources) error + func (e *UniversalExecutor) Version() (*ExecutorVersion, error) + func (e *UniversalExecutor) Wait(ctx context.Context) (*ProcessState, error)