Documentation
¶
Overview ¶
Package consul implements onexmesh registry.Registrar and registry.Discovery backed by HashiCorp Consul (github.com/hashicorp/consul/api).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDiscovery ¶
NewDiscovery creates a Consul Discovery.
Types ¶
type Options ¶
type Options struct {
// Addr is the Consul agent address, e.g. "127.0.0.1:8500".
Addr string
// Scheme is the URI scheme of the Consul agent, "http" or "https".
Scheme string
// Token is the Consul ACL token, if required.
Token string
// Datacenter selects the Consul datacenter.
Datacenter string
// Namespace is the Consul Enterprise namespace.
Namespace string
// TTL is the service check TTL; the registrar heartbeats at half this
// interval. Default 15s.
TTL time.Duration
// Host is the local instance host used for registration.
Host string
// Port is the local instance port used for registration.
Port int
// Protocol is the service protocol, e.g. "grpc" or "http".
Protocol string
}
Options configures the Consul backend.
Click to show internal directories.
Click to hide internal directories.