Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶ added in v0.9.0
type Config struct { // Consul ACL Token ConsulToken string `default:"" envconfig:"consul_token"` }
Config is Consul hook configuration settable from environment
type Hook ¶
type Hook struct {
// contains filtered or unexported fields
}
Hook is an executor hook implementation that will register and deregister a service instance in Consul right after startup and just before task termination, respectively.
func (*Hook) DeregisterFromConsul ¶
func (h *Hook) DeregisterFromConsul(taskInfo mesosutils.TaskInfo) error
DeregisterFromConsul will deregister service IDs from Consul that were created during AfterTaskStartEvent hook event.
func (*Hook) HandleEvent ¶
HandleEvent calls appropriate hook functions that correspond to supported event types. Unsupported events are ignored.
func (*Hook) RegisterIntoConsul ¶
func (h *Hook) RegisterIntoConsul(taskInfo mesosutils.TaskInfo) error
RegisterIntoConsul generates an id and sends service information to Consul Agent
Click to show internal directories.
Click to hide internal directories.