balancer

command module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: MIT Imports: 9 Imported by: 0

README

Used

$ git clone https://github.com/chenpkg/balancer.git
$ cd ./balancer
$ go build

run http test server

$ cd ./httptest
$ go run server.go 8080 8081 8082 8083

after run balancer

$ cd ..
$ ./balancer
Schema: http
Port: 8000
Health Check: true
Location:
        Route: /
        Proxy Pass: [http://127.0.0.1:8080 http://127.0.0.1:8081 http://127.0.0.1:8082 http://127.0.0.1:8083 http://127.0.0.1:8084]
        Mode: round-robin

        Route: /random
        Proxy Pass: [http://127.0.0.1:8082 http://127.0.0.1:8083 http://127.0.0.1:8084]
        Mode: random

and run http client

$ cd ./httptest
$ go run client.go
127.0.0.1:8080
127.0.0.1:8081

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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