go-micro: github.com/micro/go-micro/registry/consul Index | Files

package consul

import "github.com/micro/go-micro/registry/consul"


Package Files

consul.go encoding.go options.go watcher.go

func AllowStale Uses

func AllowStale(v bool) registry.Option

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 Config Uses

func Config(c *consul.Config) registry.Option

func Connect Uses

func Connect() registry.Option

Connect specifies services should be registered as Consul Connect services

func NewRegistry Uses

func NewRegistry(opts ...registry.Option) registry.Registry

func QueryOptions Uses

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

func TCPCheck Uses

func TCPCheck(t time.Duration) registry.Option

TCPCheck will tell the service provider to check the service address and port every `t` interval. It will enabled only if `t` is greater than 0. See `TCP + Interval` for more information [1].

[1] https://www.consul.io/docs/agent/checks.html

Package consul imports 22 packages (graph) and is imported by 29 packages. Updated 2019-10-08. Refresh now. Tools for package owners.