resolver

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Discovery

type Discovery interface {
	Discover(domain string) (builder gresolver.Builder, err error)
	Close() (err error)
	Address() (addr string)
}

type EtcdDiscovery

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

func NewEtcdDiscovery

func NewEtcdDiscovery(etcdClient *clientv3.Client, domain string) *EtcdDiscovery

func (*EtcdDiscovery) Address

func (e *EtcdDiscovery) Address() (addr string)

func (*EtcdDiscovery) Close

func (e *EtcdDiscovery) Close() (err error)

func (*EtcdDiscovery) Discover

func (e *EtcdDiscovery) Discover(service string) (builder gresolver.Builder, err error)

type EtcdRegistry

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

func NewEtcdRegistry

func NewEtcdRegistry(ctx context.Context, etcdClient *clientv3.Client, domain string) *EtcdRegistry

func (*EtcdRegistry) Close

func (e *EtcdRegistry) Close() (err error)

func (*EtcdRegistry) Register

func (e *EtcdRegistry) Register(serviceInfo *ServiceInfo) (err error)

type Registry

type Registry interface {
	Register(serviceInfo *ServiceInfo) (err error)
	Close() (err error)
}

type ServiceInfo

type ServiceInfo struct {
	Name     string
	Address  string
	Tags     []string
	Interval time.Duration
}

func NewServiceInfo

func NewServiceInfo() *ServiceInfo

Jump to

Keyboard shortcuts

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