discoverypool

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

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

Pool maps discovery service instances to their info.

func New

func New(svcInfo topology.IDAddrMap) (*Pool, error)

New populates the pool with discovery service instances from the map in svcInfo. At least one instance must be present.

func (*Pool) Choose

func (p *Pool) Choose() (discovery.InstanceInfo, error)

Choose returns the info for the discovery service instance with the minimal fail count in the pool.

func (*Pool) Update

func (p *Pool) Update(svcInfo topology.IDAddrMap) error

Update adds missing instances and removes instances which are no longer in the topology.

Jump to

Keyboard shortcuts

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