MCPcopy
hub / github.com/redis/go-redis / CircuitBreakerOpened

Function CircuitBreakerOpened

internal/maintnotifications/logs/log_messages.go:580–586  ·  view source on GitHub ↗
(endpoint string, failures int64)

Source from the content-addressed store, hash-verified

578}
579
580func CircuitBreakerOpened(endpoint string, failures int64) string {
581 message := fmt.Sprintf("%s for endpoint %s after %d failures", CircuitBreakerOpenedMessage, endpoint, failures)
582 return appendJSONIfDebug(message, map[string]interface{}{
583 "endpoint": endpoint,
584 "failures": failures,
585 })
586}
587
588func CircuitBreakerReopened(endpoint string) string {
589 message := fmt.Sprintf("%s for endpoint %s due to failure in half-open state", CircuitBreakerReopenedMessage, endpoint)

Callers 1

recordFailureMethod · 0.92

Calls 1

appendJSONIfDebugFunction · 0.85

Tested by

no test coverage detected