mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 09:55:44 +03:00
22 lines
355 B
Go
22 lines
355 B
Go
// +build deprecated
|
|
|
|
package taskrunner
|
|
|
|
// Name returns the name of the task
|
|
func (r *TaskRunner) Name() string {
|
|
if r == nil || r.task == nil {
|
|
return ""
|
|
}
|
|
|
|
return r.task.Name
|
|
}
|
|
|
|
// IsLeader returns whether the task is a leader task
|
|
func (r *TaskRunner) IsLeader() bool {
|
|
if r == nil || r.task == nil {
|
|
return false
|
|
}
|
|
|
|
return r.task.Leader
|
|
}
|