discovery

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2023 License: Apache-2.0, BSD-3-Clause, MIT, + 1 more Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSDiscovery

type DNSDiscovery struct{}

DNSDiscovery DNS structure.

func (*DNSDiscovery) List

func (hd *DNSDiscovery) List(service string, opt ...discovery.Option) (nodes []*registry.Node, err error)

List available Nodes.

type Discovery

type Discovery struct {
	// contains filtered or unexported fields
}

Discovery structure.

var DefaultDiscovery *Discovery

DefaultDiscovery instantiated objects by Discovery structure.

func New

func New(options ...Option) (*Discovery, error)

New instantiates discovery.

func (*Discovery) List

func (d *Discovery) List(serviceName string, opts ...tdiscovery.Option) ([]*registry.Node, error)

List gets available service nodes, including only the healthy ones.

func (*Discovery) ListAll

func (d *Discovery) ListAll(serviceName string, opts ...tdiscovery.Option) (healthyNodes []*registry.Node,
	unhealthyNodes []*registry.Node, err error)

ListAll gets all service nodes, including healthy and unhealthy ones.

type Option

type Option func(options *Options)

Option configuration function.

func WithClient

func WithClient(client *api.Client) Option

WithClient sets up consul client.

type Options

type Options struct {
	// contains filtered or unexported fields
}

Options service discovery configuration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL