Versions in this module Expand all Collapse all v1 v1.0.0 Apr 19, 2016 Changes in this version + const Version + var CacheTTL = 10 * time.Minute + var DefaultConfig = api.DefaultConfig + var DefaultRetrier = retry.ConstantBackoff + var Scheme = "http" + func New(config *Config) plugin.Plugin + type Config struct + Cache bool + CacheTTL time.Duration + Client *api.Config + Query *api.QueryOptions + Retrier retry.Retrier + Retry bool + Scheme string + Service string + Tag string + func NewBasicConfig(server string) *Config + func NewConfig(server, service string) *Config + type Consul struct + Client *api.Client + Config *Config + func NewClient(config *Config) *Consul + func (c *Consul) GetBestCandidateNode(ctx *context.Context) (string, error) + func (c *Consul) GetNodes() ([]string, error) + func (c *Consul) IsUpdated() bool + func (c *Consul) OnBeforeDial(ctx *context.Context, h context.Handler) + func (c *Consul) Plugin() plugin.Plugin + func (c *Consul) SetServerURL(ctx *context.Context, host string) + func (c *Consul) UpdateCache(nodes []string) + func (c *Consul) UseBestCandidateNode(ctx *context.Context) error + type Retrier struct + Consul *Consul + Context *context.Context + Retry retry.Retrier + func NewRetrier(c *Consul, ctx *context.Context) *Retrier + func (r *Retrier) Run(fn func() error) error Incompatible versions in this module v2.0.1+incompatible Sep 11, 2017 v2.0.0+incompatible Sep 10, 2017