server

package
v0.0.0-...-362e55c Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Ins []*Instance = make([]*Instance, 0)

Functions

func NewInstance

func NewInstance(scheme, host, port string)

func RegisterBalance

func RegisterBalance(algorithm string, b Balance)

Types

type Balance

type Balance interface {
	Balancing() (*Instance, int, error)
}

type Balances

type Balances struct {
	AllBalances map[string]Balance
}
var BA Balances = Balances{
	AllBalances: make(map[string]Balance),
}

func (*Balances) RegisterBalance

func (ba *Balances) RegisterBalance(algorithm string, b Balance)

type Instance

type Instance struct {
	Host   string
	Port   string
	Scheme string
}

func Balancing

func Balancing(algorithm string) (*Instance, int, error)

func (*Instance) ToAddress

func (ins *Instance) ToAddress() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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