balancer

package
Version: v2.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Balancer

type Balancer interface {
	// Pick one node
	Pick(ctx context.Context) (node *registry.ServiceInstance, done func(context.Context, DoneInfo), err error)
	// Update nodes when nodes removed or added
	Update(nodes []*registry.ServiceInstance)
}

Balancer is node pick balancer

type DoneInfo

type DoneInfo struct {
	Err     error
	Trailer map[string]string
}

DoneInfo is callback when rpc done

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL