balancer

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BuilderName = "easycarBalancer"
)

Functions

func Register

func Register(fns ...Option)

Types

type Algorithm

type Algorithm int

Algorithm is algorithm of balancer

const (
	IPHashBalancer Algorithm = iota + 1
	ConsistentHashBalancer
	P2CBalancer
	RandomBalancer
	R2Balancer
	LeastLoadBalancer
	BoundedBalancer
)

func (Algorithm) Name

func (l Algorithm) Name() string

type Builder

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

func (*Builder) Build

type Option

type Option func(options *Options)

func WithAlgorithm

func WithAlgorithm(algorithm Algorithm) Option

type Options

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

type Picker

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

func (*Picker) Pick

Jump to

Keyboard shortcuts

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