mirror of
https://github.com/labstack/echo.git
synced 2025-11-29 22:48:07 +02:00
Dynamically add/remove proxy targets
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
@@ -55,9 +55,7 @@ func TestProxy(t *testing.T) {
|
||||
URL: url2,
|
||||
},
|
||||
}
|
||||
rb := &RandomBalancer{
|
||||
Targets: targets,
|
||||
}
|
||||
rb := NewRandomBalancer(targets)
|
||||
|
||||
// Random
|
||||
e := echo.New()
|
||||
@@ -75,9 +73,7 @@ func TestProxy(t *testing.T) {
|
||||
})
|
||||
|
||||
// Round-robin
|
||||
rrb := &RoundRobinBalancer{
|
||||
Targets: targets,
|
||||
}
|
||||
rrb := NewRoundRobinBalancer(targets)
|
||||
e = echo.New()
|
||||
e.Use(Proxy(rrb))
|
||||
rec = newCloseNotifyRecorder()
|
||||
|
||||
Reference in New Issue
Block a user