Skip to content

myENA/consultant

 
 

Repository files navigation

consultant

Helpful wrappers around Consul API client

Build Status

Client

Our Consultant Client is a thin wrapper around the Consul API Client. It provides

  • Simplified Service Retrieval (see here)
  • Simplified Service Registration (see here)

Sibling Services Locator

If you run in an environment where you are running several instances of the same service, it can be useful sometimes to have a way for each service too find it's sibling services.

Look here for some basic documentation.

Service Candidate Election

With a multi-service setup, there are times where might want one service to be responsible for a specific task. This task can range from being considered the leader of the entire cluster of services OR simply a single sub-task that must run atomically.

Look here for some basic documentation.

Managed Services

ManagedService is a lightweight lifecycle manager for Consul services.

Watch Plan Helpers

watch.go contains two sets of methods:

  • Package helper functions that will construct one of the already available watch functions provided by hashi
  • Helper methods hanging off of our Client struct that will fill in some values based on the client's own definition

TODO:

  • More tests
  • More docs
  • More stuff
  • ManagedService consistency checks