Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoCatalog is returned when there is no catalog in Consul client ErrNoCatalog = errors.New("no Consul catalog in client") // ErrNoService is returned when there are no services registered for that // service name and tag ErrNoService = errors.New("no service registered under this service name and tag") // Consul client Client *api.Client ConsulCatalog Catalog )
Functions ¶
func ServiceHostPort ¶
ServiceHostPort looks up a service by just service name or tag.service from local Consul agent
func TagServiceHostPort ¶
TagServiceHostPort looks up a service by service name and tag from local Consul agent
func TagServiceHostPortMulti ¶
TagServiceHostPortMulti looks up a service by service name and tag from local Consul agent
Types ¶
type Catalog ¶
type Catalog interface { Datacenters() ([]string, error) Deregister(*api.CatalogDeregistration, *api.WriteOptions) (*api.WriteMeta, error) Node(string, *api.QueryOptions) (*api.CatalogNode, *api.QueryMeta, error) Nodes(*api.QueryOptions) ([]*api.Node, *api.QueryMeta, error) Register(*api.CatalogRegistration, *api.WriteOptions) (*api.WriteMeta, error) Service(string, string, *api.QueryOptions) ([]*api.CatalogService, *api.QueryMeta, error) Services(*api.QueryOptions) (map[string][]string, *api.QueryMeta, error) }
Catalog is an interface generated for "github.com/hashicorp/consul/api".Catalog.
Click to show internal directories.
Click to hide internal directories.