p2c

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: MIT Imports: 7 Imported by: 12

Documentation

Index

Constants

View Source
const (

	// Name is balancer name
	Name = "p2c"
)

Variables

This section is empty.

Functions

func New

func New(opts ...Option) selector.Selector

New creates a p2c selector.

func NewBuilder added in v2.1.1

func NewBuilder(opts ...Option) selector.Builder

NewBuilder returns a selector builder with p2c balancer

Types

type Balancer

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

Balancer is p2c selector.

func (*Balancer) Pick

Pick pick a node.

type Builder added in v2.1.1

type Builder struct{}

Builder is p2c builder

func (*Builder) Build added in v2.1.1

func (b *Builder) Build() selector.Balancer

Build creates Balancer

type Option

type Option func(o *options)

Option is random builder option.

Jump to

Keyboard shortcuts

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