discovery

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: AGPL-3.0 Imports: 9 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 Discovery

type Discovery interface {
	Subscribe(updates Updates)
	ServerError(srv Server)
	Close()
}

func NewDiscovery

func NewDiscovery(l log.Logger, address string) (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) ServerError

func (g *KubeDiscovery) ServerError(srv Server)

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) ServerError

func (s *StaticDiscovery) ServerError(srv Server)

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