Files
nomad/command/agent/consul/testing.go
2023-04-10 15:36:59 +00:00

22 lines
440 B
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package consul
import (
"context"
"github.com/hashicorp/nomad/client/serviceregistration"
"github.com/hashicorp/nomad/nomad/structs"
)
func NoopRestarter() serviceregistration.WorkloadRestarter {
return noopRestarter{}
}
type noopRestarter struct{}
func (noopRestarter) Restart(ctx context.Context, event *structs.TaskEvent, failure bool) error {
return nil
}