github.com/hernad/nomad@v1.6.112/command/agent/consul/testing.go (about) 1 // Copyright (c) HashiCorp, Inc. 2 // SPDX-License-Identifier: MPL-2.0 3 4 package consul 5 6 import ( 7 "context" 8 9 "github.com/hernad/nomad/client/serviceregistration" 10 "github.com/hernad/nomad/nomad/structs" 11 ) 12 13 func NoopRestarter() serviceregistration.WorkloadRestarter { 14 return noopRestarter{} 15 } 16 17 type noopRestarter struct{} 18 19 func (noopRestarter) Restart(ctx context.Context, event *structs.TaskEvent, failure bool) error { 20 return nil 21 }