When this was originally developed, many exisiting patterns in the
application weren't established yet. This adds support for the
chronograf.Logger as well as removes some cruft that just isn't used
anymore. Interfaces have also been updated to align with what they are
today.
Open() wasn't a hard requirement, so it was a little surprising to need
to use it when creating an enterprise.Client in some circumstances but
not others. This returns an error when Querying if Open() was not
called, preventing panics which would otherwise result. Granted, this
would only be encountered by developers, but I believe a helpful error
is sometimes more useful than a mysterious panic when making libs that
devs actually enjoy using. Furthermore, a preflight check to see whether
dataNodes was initialized makes the Open() method idempotent.
Many different ways exist to specify the URL for a meta node, including
host:port, scheme://host:port. This provides a function that handles the
irregularities associated with meta URLs and initializes a Client with a
control.Client for introspecting the associated cluster.
container/ring wasn't being used correctly, so all requests were
directed to the first data node in the ring. This ensures (via test)
that queries are properly distributed among available data nodes.
This is an initial implementation of the Influx Enterprise client. It
incorporates introspection of a cluster to determine available data
nodes and issues requests in a round-robin fasion to those nodes.
Currently all nodes are assumed to be healthy, so there is no pruning of
the available data node pool.