bd454a4c6f
* client: improve group service stanza interpolation and check_restart support Interpolation can now be done on group service stanzas. Note that some task runtime specific information that was previously available when the service was registered poststart of a task is no longer available. The check_restart stanza for checks defined on group services will now properly restart the allocation upon check failures if configured.
18 lines
293 B
Go
18 lines
293 B
Go
package consul
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/hashicorp/nomad/nomad/structs"
|
|
)
|
|
|
|
func NoopRestarter() WorkloadRestarter {
|
|
return noopRestarter{}
|
|
}
|
|
|
|
type noopRestarter struct{}
|
|
|
|
func (noopRestarter) Restart(ctx context.Context, event *structs.TaskEvent, failure bool) error {
|
|
return nil
|
|
}
|