Skip to content
Snippets Groups Projects
Commit a58d8327 authored by watermelo's avatar watermelo
Browse files

Fix: rename SethealthChecker to SetHealthChecker

parent 457da8fc
No related branches found
No related tags found
No related merge requests found
......@@ -26,8 +26,8 @@ var (
healthCheckers = make(map[string]func(url *common.URL) router.HealthChecker)
)
// SethealthChecker sets the HealthChecker with @name
func SethealthChecker(name string, fcn func(_ *common.URL) router.HealthChecker) {
// SetHealthChecker sets the HealthChecker with @name
func SetHealthChecker(name string, fcn func(_ *common.URL) router.HealthChecker) {
healthCheckers[name] = fcn
}
......
......@@ -32,7 +32,7 @@ import (
)
func TestGetHealthChecker(t *testing.T) {
SethealthChecker("mock", newMockhealthCheck)
SetHealthChecker("mock", newMockHealthCheck)
checker := GetHealthChecker("mock", common.NewURLWithOptions())
assert.NotNil(t, checker)
}
......@@ -44,6 +44,6 @@ func (m mockHealthChecker) IsHealthy(invoker protocol.Invoker) bool {
return true
}
func newMockhealthCheck(_ *common.URL) router.HealthChecker {
func newMockHealthCheck(_ *common.URL) router.HealthChecker {
return &mockHealthChecker{}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment