Documentation ¶
Index ¶
- func AllowStale(v bool) registry.Option
- func Config(c *consul.Config) registry.Option
- func Connect() registry.Option
- func HTTPCheck(protocol, port, httpEndpoint string, interval, timeout time.Duration) registry.Option
- func NewRegistry(opts ...registry.Option) registry.Registry
- func QueryOptions(q *consul.QueryOptions) registry.Option
- func TCPCheck(t time.Duration) registry.Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowStale ¶
AllowStale sets whether any Consul server (non-leader) can service a read. This allows for lower latency and higher throughput at the cost of potentially stale data. Works similar to Consul DNS Config option [1]. Defaults to true.
[1] https://www.consul.io/docs/agent/options.html#allow_stale
func HTTPCheck ¶
func HTTPCheck(protocol, port, httpEndpoint string, interval, timeout time.Duration) registry.Option
HTTPCheck will tell the service provider to invoke the health check endpoint with an interval and timeout. It will be enabled only if interval and timeout are greater than 0. See `HTTP + Interval` for more information [1].
func QueryOptions ¶
func QueryOptions(q *consul.QueryOptions) registry.Option
QueryOptions specifies the QueryOptions to be used when calling Consul. See `Consul API` for more information [1].
[1] https://godoc.org/github.com/hashicorp/consul/api#QueryOptions
Types ¶
This section is empty.