2017-02-01 00:43:57 +00:00
|
|
|
package client
|
|
|
|
|
|
|
|
import (
|
2017-04-12 20:26:55 +00:00
|
|
|
"github.com/hashicorp/nomad/client/driver"
|
2017-06-09 17:29:41 +00:00
|
|
|
cstructs "github.com/hashicorp/nomad/client/structs"
|
2017-08-07 22:54:05 +00:00
|
|
|
"github.com/hashicorp/nomad/command/agent/consul"
|
2017-02-01 00:43:57 +00:00
|
|
|
"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-06-09 17:29:41 +00:00
|
|
|
RegisterTask(allocID string, task *structs.Task, exec driver.ScriptExecutor, net *cstructs.DriverNetwork) error
|
2017-02-01 00:43:57 +00:00
|
|
|
RemoveTask(allocID string, task *structs.Task)
|
2017-06-16 23:35:16 +00:00
|
|
|
UpdateTask(allocID string, existing, newTask *structs.Task, exec driver.ScriptExecutor, net *cstructs.DriverNetwork) error
|
2017-08-07 22:54:05 +00:00
|
|
|
AllocRegistrations(allocID string) (*consul.AllocRegistration, error)
|
2017-02-01 00:43:57 +00:00
|
|
|
}
|