github.com/zoomfoo/nomad@v0.8.5-0.20180907175415-f28fd3a1a056/client/allocrunner/taskrunner/getters.go (about) 1 package taskrunner 2 3 // Name returns the name of the task 4 func (r *TaskRunner) Name() string { 5 if r == nil || r.task == nil { 6 return "" 7 } 8 9 return r.task.Name 10 } 11 12 // IsLeader returns whether the task is a leader task 13 func (r *TaskRunner) IsLeader() bool { 14 if r == nil || r.task == nil { 15 return false 16 } 17 18 return r.task.Leader 19 }