github.com/djenriquez/nomad-1@v0.8.1/client/consul.go (about) 1 package client 2 3 import ( 4 "github.com/hashicorp/nomad/client/driver" 5 cstructs "github.com/hashicorp/nomad/client/structs" 6 "github.com/hashicorp/nomad/command/agent/consul" 7 "github.com/hashicorp/nomad/nomad/structs" 8 ) 9 10 // ConsulServiceAPI is the interface the Nomad Client uses to register and 11 // remove services and checks from Consul. 12 type ConsulServiceAPI interface { 13 RegisterTask(allocID string, task *structs.Task, restarter consul.TaskRestarter, exec driver.ScriptExecutor, net *cstructs.DriverNetwork) error 14 RemoveTask(allocID string, task *structs.Task) 15 UpdateTask(allocID string, existing, newTask *structs.Task, restart consul.TaskRestarter, exec driver.ScriptExecutor, net *cstructs.DriverNetwork) error 16 AllocRegistrations(allocID string) (*consul.AllocRegistration, error) 17 }