-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
- Loading branch information
Showing
2 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package pool | ||
|
||
import ( | ||
"time" | ||
) | ||
|
||
// noOpClientStatusMonitor is using by default for pool. | ||
type noOpClientStatusMonitor struct { | ||
addr string | ||
} | ||
|
||
func newNoOpClientStatusMonitor(addr string) noOpClientStatusMonitor { | ||
return noOpClientStatusMonitor{addr: addr} | ||
} | ||
|
||
func (n noOpClientStatusMonitor) updateErrorRate(_ error) { | ||
} | ||
|
||
func (n noOpClientStatusMonitor) incRequests(_ time.Duration, _ MethodIndex) { | ||
} | ||
|
||
func (n noOpClientStatusMonitor) isHealthy() bool { | ||
return true | ||
} | ||
|
||
func (n noOpClientStatusMonitor) setUnhealthy() { | ||
} | ||
|
||
func (n noOpClientStatusMonitor) setHealthy() { | ||
} | ||
|
||
func (n noOpClientStatusMonitor) address() string { | ||
return n.addr | ||
} | ||
|
||
func (n noOpClientStatusMonitor) currentErrorRate() uint32 { | ||
return 0 | ||
} | ||
|
||
func (n noOpClientStatusMonitor) overallErrorRate() uint64 { | ||
return 0 | ||
} | ||
|
||
func (n noOpClientStatusMonitor) methodsStatus() []statusSnapshot { | ||
return nil | ||
} |