github.com/hhrutter/nomad@v0.6.0-rc2.0.20170723054333-80c4b03f0705/client/consul.go (about) 1 package client 2 3 import ( 4 "github.com/hashicorp/consul/api" 5 "github.com/hashicorp/nomad/client/driver" 6 cstructs "github.com/hashicorp/nomad/client/structs" 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, exec driver.ScriptExecutor, net *cstructs.DriverNetwork) error 14 RemoveTask(allocID string, task *structs.Task) 15 UpdateTask(allocID string, existing, newTask *structs.Task, exec driver.ScriptExecutor, net *cstructs.DriverNetwork) error 16 Checks(alloc *structs.Allocation) ([]*api.AgentCheck, error) 17 }