open-nomad/command/agent/consul/testing.go
Nick Ethier bd454a4c6f
client: improve group service stanza interpolation and check_re… (#6586)
* 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.
2019-11-18 13:04:01 -05:00

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
}