proxy: cleanup and minor refactoring
This change includes minor refactoring and cleanup of the proxy package including the following items: * Rename source files with misspelling of round robin * Remove unnecessary and redundant comments * Update comments for clarity * Add locking when updating the round-robin index * Improve method receiver names * Rename the LoadBalance method to NextEndpoint to add clarity No changes in behaviour have been introduced.
This commit is contained in:
@@ -68,9 +68,8 @@ func testEchoConnection(t *testing.T, address, port string) {
|
||||
func TestProxy(t *testing.T) {
|
||||
port, err := echoServer(t, "127.0.0.1:0")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
t.Fatalf("Unexpected error: %v", err)
|
||||
}
|
||||
|
||||
lb := NewLoadBalancerRR()
|
||||
lb.OnUpdate([]api.Endpoints{
|
||||
{JSONBase: api.JSONBase{ID: "echo"}, Endpoints: []string{net.JoinHostPort("127.0.0.1", port)}}})
|
||||
|
Reference in New Issue
Block a user