discovery

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParsePeer

func ParsePeer(raw string) raft.Server

func ParsePeers

func ParsePeers(raw string) []raft.Server

Types

type DNSDiscovery added in v1.10.0

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

func NewDNSDiscovery added in v1.10.0

func NewDNSDiscovery(l log.Logger, addr string, p *dns.Provider) *DNSDiscovery

func (*DNSDiscovery) Close added in v1.10.0

func (d *DNSDiscovery) Close()

func (*DNSDiscovery) Rediscover added in v1.10.0

func (d *DNSDiscovery) Rediscover()

func (*DNSDiscovery) Subscribe added in v1.10.0

func (d *DNSDiscovery) Subscribe(updates Updates)

type Discovery

type Discovery interface {
	Subscribe(updates Updates)
	Rediscover()
	Close()
}

func NewDiscovery

func NewDiscovery(l log.Logger, address string, reg prometheus.Registerer) (Discovery, error)

type KubeDiscovery

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

func NewKubeResolverDiscovery

func NewKubeResolverDiscovery(l log.Logger, target string, client kuberesolver2.K8sClient) (*KubeDiscovery, error)

func (*KubeDiscovery) Close

func (g *KubeDiscovery) Close()

func (*KubeDiscovery) Rediscover added in v1.10.0

func (g *KubeDiscovery) Rediscover()

func (*KubeDiscovery) Subscribe

func (g *KubeDiscovery) Subscribe(upd Updates)

type Server

type Server struct {
	Raft            raft.Server
	ResolvedAddress string
}

func (*Server) String

func (s *Server) String() string

type StaticDiscovery

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

func NewStaticDiscovery

func NewStaticDiscovery(servers []Server) *StaticDiscovery

func (*StaticDiscovery) Close

func (s *StaticDiscovery) Close()

func (*StaticDiscovery) Rediscover added in v1.10.0

func (s *StaticDiscovery) Rediscover()

func (*StaticDiscovery) Subscribe

func (s *StaticDiscovery) Subscribe(updates Updates)

type UpdateFunc

type UpdateFunc func(servers []Server)

func (UpdateFunc) Servers

func (f UpdateFunc) Servers(servers []Server)

type Updates

type Updates interface {
	Servers(servers []Server)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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