Replace router svcAddrUpdateLocks with new throttler package for code readability&reusability (#1047)

Rename svcAddrUpdateLock to Throttler and move it to the top-level directory as a package for code import.
This commit is contained in:
Ta-Ching Chen
2019-01-16 12:37:46 +08:00
committed by GitHub
parent a21dbd182c
commit 273c6c002f
6 changed files with 320 additions and 261 deletions
+2 -1
View File
@@ -26,6 +26,7 @@ import (
"github.com/fission/fission"
"github.com/fission/fission/crd"
"github.com/fission/fission/throttler"
)
func TestRouter(t *testing.T) {
@@ -57,7 +58,7 @@ func TestRouter(t *testing.T) {
timeoutExponent: 2,
keepAlive: 30 * time.Second,
maxRetries: 10,
}, false, MakeUpdateLocks(30*time.Second))
}, false, throttler.MakeThrottler(30*time.Second))
triggerUrl := "/foo"
triggers.triggers = append(triggers.triggers,
crd.HTTPTrigger{