Added the Version method to executor

This commit is contained in:
Diptanu Choudhury
2016-03-29 16:27:31 -07:00
parent 021c84afde
commit 323975d500
8 changed files with 37 additions and 7 deletions

View File

@@ -37,6 +37,7 @@ type Executor interface {
UpdateTask(task *structs.Task) error
SyncServices(ctx *ConsulContext) error
DeregisterServices() error
Version() string
}
// ConsulContext holds context to configure the consul client and run checks
@@ -162,6 +163,11 @@ func NewExecutor(logger *log.Logger) Executor {
}
}
// Version returns the api version of the executor
func (e *UniversalExecutor) Version() string {
return "1"
}
// LaunchCmd launches a process and returns it's state. It also configures an
// applies isolation on certain platforms.
func (e *UniversalExecutor) LaunchCmd(command *ExecCommand, ctx *ExecutorContext) (*ProcessState, error) {