open-nomad/client/consul.go

15 lines
497 B
Go
Raw Normal View History

package client
import (
2017-04-12 20:26:55 +00:00
"github.com/hashicorp/nomad/client/driver"
"github.com/hashicorp/nomad/nomad/structs"
)
// ConsulServiceAPI is the interface the Nomad Client uses to register and
// remove services and checks from Consul.
type ConsulServiceAPI interface {
2017-04-12 20:26:55 +00:00
RegisterTask(allocID string, task *structs.Task, exec driver.ScriptExecutor) error
RemoveTask(allocID string, task *structs.Task)
2017-04-12 20:26:55 +00:00
UpdateTask(allocID string, existing, newTask *structs.Task, exec driver.ScriptExecutor) error
}