style: format code with gofmt
This commit is contained in:
@@ -69,9 +69,9 @@ type RPCManager struct {
|
||||
type RotationPolicy string
|
||||
|
||||
const (
|
||||
RoundRobin RotationPolicy = "round-robin"
|
||||
HealthAware RotationPolicy = "health-aware"
|
||||
LeastFailures RotationPolicy = "least-failures"
|
||||
RoundRobin RotationPolicy = "round-robin"
|
||||
HealthAware RotationPolicy = "health-aware"
|
||||
LeastFailures RotationPolicy = "least-failures"
|
||||
)
|
||||
|
||||
// NewRPCManager creates a new RPC manager with multiple endpoints
|
||||
@@ -218,14 +218,14 @@ func (rm *RPCManager) GetAllHealthStats() []map[string]interface{} {
|
||||
for i, h := range rm.health {
|
||||
success, failure, consecutive, healthy := h.GetStats()
|
||||
stats = append(stats, map[string]interface{}{
|
||||
"index": i,
|
||||
"url": h.URL,
|
||||
"success_count": success,
|
||||
"failure_count": failure,
|
||||
"consecutive_fails": consecutive,
|
||||
"is_healthy": healthy,
|
||||
"last_checked": h.LastChecked,
|
||||
"response_time_ms": h.ResponseTime.Milliseconds(),
|
||||
"index": i,
|
||||
"url": h.URL,
|
||||
"success_count": success,
|
||||
"failure_count": failure,
|
||||
"consecutive_fails": consecutive,
|
||||
"is_healthy": healthy,
|
||||
"last_checked": h.LastChecked,
|
||||
"response_time_ms": h.ResponseTime.Milliseconds(),
|
||||
})
|
||||
}
|
||||
return stats
|
||||
@@ -292,8 +292,8 @@ func (rm *RPCManager) healthCheckEndpoint(ctx context.Context, index int, client
|
||||
rm.RecordFailure(index)
|
||||
return pkgerrors.WrapContextError(err, "RPCManager.healthCheckEndpoint",
|
||||
map[string]interface{}{
|
||||
"endpoint_index": index,
|
||||
"response_time": responseTime.String(),
|
||||
"endpoint_index": index,
|
||||
"response_time": responseTime.String(),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user