chash

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init added in v0.9.0

func Init() error

Init registers the consistent hashing balancer with the balancer registry.

Types

type Balancer added in v0.10.0

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

Balancer implements a consistent hashing load balancer.

func NewBalancer

func NewBalancer(endpoints []*target.Endpoint, params map[string]any) (*Balancer, error)

NewBalancer creates a new consistent hashing balancer with the given endpoints and params.

func (*Balancer) Select added in v0.10.0

Select picks an endpoint based on the configured hash key from the request context.

Jump to

Keyboard shortcuts

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