command
Version:
v0.0.1
Opens a new window with list of versions in this module.
Published: Aug 22, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
DirectHash proxy example
This example shows how to use DirectHash loadbalancer for http proxy loadbalancing.
Run example
go run ./main.go
Send requests
The example uses X-Hash-Key header to determine proxy target.
curl -H "X-Hash-Key: foo" http://localhost:8080
Example output:
$ curl -H "X-Hash-Key: foo" http://localhost:8080
target: 1
$ curl -H "X-Hash-Key: bar" http://localhost:8080
target: 2
$ curl -H "X-Hash-Key: baz" http://localhost:8080
target: 1
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.