loadbalance

package
v0.0.0-...-681e4f9 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoadBalance

type LoadBalance interface {
	SelectService(service []*common.ServiceInstance) (*common.ServiceInstance, error)
}

负载均衡器

type RandomLoadBalance

type RandomLoadBalance struct {
}

func (*RandomLoadBalance) SelectService

func (loadBalance *RandomLoadBalance) SelectService(services []*common.ServiceInstance) (*common.ServiceInstance, error)

随机负载均衡

type WeightRoundRobinLoadBalance

type WeightRoundRobinLoadBalance struct {
}

func (*WeightRoundRobinLoadBalance) SelectService

func (loadBalance *WeightRoundRobinLoadBalance) SelectService(services []*common.ServiceInstance) (best *common.ServiceInstance, err error)

权重平滑负载均衡

Jump to

Keyboard shortcuts

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