selector

package
v0.0.0-...-3b1ec4e Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPSelector

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

func (*IPSelector) Select

func (r *IPSelector) Select(service string) (*Node, error)

func (*IPSelector) Update

func (s *IPSelector) Update(node *Node, err error) error

Update do nothing in IPSelector

type Node

type Node struct {
	Network string
	Address string
}

represent a host

type Selector

type Selector interface {
	Select(service string) (*Node, error)
	Update(node *Node, err error) error
}

func NewIPSelector

func NewIPSelector(name, network string, typ SelectorType, conf clientv3.Config) Selector

type SelectorType

type SelectorType int
const (
	RANDOM SelectorType = iota
	ROUND_ROUBIN
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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