svrbalance

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: MIT Imports: 2 Imported by: 0

README

服务器负载平衡中间件

add by stefan

Documentation

Index

Constants

View Source
const (
	ESvrBalanceMaxPersons = int32(10000)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IBalance

type IBalance interface {
	AddSvr(svr string)
	Push(svr string)
	GetSvr() (s string)
}

type TExternal

type TExternal struct {
	Persons int32
}

type TSvrBalanceV1

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

func (*TSvrBalanceV1) AddSvr

func (this *TSvrBalanceV1) AddSvr(svr string)

func (*TSvrBalanceV1) GetSvr

func (this *TSvrBalanceV1) GetSvr() (s string)

get second max server persons

func (*TSvrBalanceV1) NewBalance

func (this *TSvrBalanceV1) NewBalance()

func (*TSvrBalanceV1) Push

func (this *TSvrBalanceV1) Push(svr string)

some one connect gateway to balance route push one server.

type TSvrBalanceV2

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

func (*TSvrBalanceV2) AddSvr

func (this *TSvrBalanceV2) AddSvr(svr string)

func (*TSvrBalanceV2) GetSvr

func (this *TSvrBalanceV2) GetSvr() (s string)

get second max server persons

func (*TSvrBalanceV2) NewBalance

func (this *TSvrBalanceV2) NewBalance()

func (*TSvrBalanceV2) Push

func (this *TSvrBalanceV2) Push(svr string)

some one connect gateway to balance route push one server.

type TSvrBalanceV3

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

func (*TSvrBalanceV3) AddSvr

func (this *TSvrBalanceV3) AddSvr(svr string)

func (*TSvrBalanceV3) GetSvr

func (this *TSvrBalanceV3) GetSvr() (s string)

get min server persons

func (*TSvrBalanceV3) NewBalance

func (this *TSvrBalanceV3) NewBalance()

func (*TSvrBalanceV3) Push

func (this *TSvrBalanceV3) Push(svr string)

some one connect gateway to balance route push one server.

Jump to

Keyboard shortcuts

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