Thanks to visit codestin.com
Credit goes to pkg.go.dev

ringhash

package
v1.72.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2025 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Overview

Package ringhash implements resolver related functions for the ring_hash load balancing policy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashKey

func HashKey(endpoint resolver.Endpoint) string

HashKey returns the hash key attribute of endpoint. If this attribute is not set, it returns the empty string.

Experimental

Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.

func SetHashKey

func SetHashKey(endpoint resolver.Endpoint, hashKey string) resolver.Endpoint

SetHashKey sets the hash key for this endpoint. Combined with the ring_hash load balancing policy, it allows placing the endpoint on the ring based on an arbitrary string instead of the IP address. If hashKey is empty, the endpoint is returned unmodified.

Experimental

Notice: This API is EXPERIMENTAL and may be changed or removed in a later release.

Types

This section is empty.

Jump to

Keyboard shortcuts

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