discovery

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 13 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 {
	resolver.Builder
	GetAddr(name string) ([]string, error)
}

type EtcdDiscovery

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

func NewEtcdDiscovery

func NewEtcdDiscovery(etcd *etcd.Etcd) *EtcdDiscovery

func (*EtcdDiscovery) Build

func (*EtcdDiscovery) GetAddr

func (e *EtcdDiscovery) GetAddr(service string) ([]string, error)

func (*EtcdDiscovery) Scheme

func (mb *EtcdDiscovery) Scheme() string

type EtcdRegiser

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

func NewEtcdRegiser

func NewEtcdRegiser(e *etcd.Etcd) *EtcdRegiser

func (*EtcdRegiser) Regist

func (e *EtcdRegiser) Regist(name, host string, port int)

func (*EtcdRegiser) Revoke

func (e *EtcdRegiser) Revoke()

type FilePortProvider

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

func NewFilePortProvider

func NewFilePortProvider(filename string) *FilePortProvider

func (*FilePortProvider) Close

func (am *FilePortProvider) Close()

func (*FilePortProvider) GetAddr

func (am *FilePortProvider) GetAddr(service string) ([]string, error)

func (*FilePortProvider) GetPort

func (am *FilePortProvider) GetPort(service string) (int, error)

type FileReader

type FileReader interface {
	ReadFile(name string) ([]byte, error)
}

type FileStaticDiscovery

type FileStaticDiscovery struct {
	*FilePortProvider
	// contains filtered or unexported fields
}

func NewFileStaticDiscovery

func NewFileStaticDiscovery(filename string) *FileStaticDiscovery

func (*FileStaticDiscovery) Build

func (*FileStaticDiscovery) Scheme

func (mb *FileStaticDiscovery) Scheme() string

type NullRegiser

type NullRegiser struct {
}

func NewNullRegister

func NewNullRegister() *NullRegiser

func (*NullRegiser) Regist

func (e *NullRegiser) Regist(name, host string, port int)

func (*NullRegiser) Revoke

func (e *NullRegiser) Revoke()

type PortProvider

type PortProvider interface {
	GetPort(name string) (int, error)
	Close()
}

type Register

type Register interface {
	Regist(name, host string, port int)
	Revoke()
}

type SystemPortProvider

type SystemPortProvider struct {
}

func NewSystemPortProvider

func NewSystemPortProvider() *SystemPortProvider

func (*SystemPortProvider) Close

func (e *SystemPortProvider) Close()

func (*SystemPortProvider) GetPort

func (e *SystemPortProvider) GetPort(service string) (int, error)

Jump to

Keyboard shortcuts

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