github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/command/agent/consul/testing.go (about)

     1  package consul
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/hashicorp/nomad/client/serviceregistration"
     7  	"github.com/hashicorp/nomad/nomad/structs"
     8  )
     9  
    10  func NoopRestarter() serviceregistration.WorkloadRestarter {
    11  	return noopRestarter{}
    12  }
    13  
    14  type noopRestarter struct{}
    15  
    16  func (noopRestarter) Restart(ctx context.Context, event *structs.TaskEvent, failure bool) error {
    17  	return nil
    18  }