loadbalance

package
v0.0.0-...-2816995 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoInstances = errors.New("service instances are not existed")

Functions

This section is empty.

Types

type LoadBalance

type LoadBalance interface {
	SelectService(service []*api.AgentService) (*api.AgentService, error)
}

负载均衡器

type RandomLoadBalance

type RandomLoadBalance struct {
}

func (*RandomLoadBalance) SelectService

func (loadBalance *RandomLoadBalance) SelectService(services []*api.AgentService) (*api.AgentService, error)

随机负载均衡

type WeightRoundRobinLoadBalance

type WeightRoundRobinLoadBalance struct {
}

Jump to

Keyboard shortcuts

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