loadbalance

package
v0.1.78 Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 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 BalancerBuildOption

type BalancerBuildOption func(b *Builder)

func BuilderWithFilter

func BuilderWithFilter(f filter.Filter) BalancerBuildOption

func BuilderWithPickerFunc

func BuilderWithPickerFunc(pickerFunc PickerFunc) BalancerBuildOption

type Builder

type Builder struct {
	Filter filter.Filter
	// contains filtered or unexported fields
}

func NewBalancerBuilder

func NewBalancerBuilder(opts ...BalancerBuildOption) *Builder

func (*Builder) Build

func (b *Builder) Build(info base.PickerBuildInfo) balancer.Picker

type NodeInfo

type NodeInfo struct {
	SubConn balancer.SubConn
}

type Picker

type Picker struct {
	Nodes []*NodeInfo
}

func (Picker) Pick

func (p Picker) Pick(info balancer.PickInfo) (balancer.PickResult, error)

type PickerFunc

type PickerFunc func(nodes []*NodeInfo) balancer.Picker

Directories

Path Synopsis
普通轮询
普通轮询

Jump to

Keyboard shortcuts

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