package logs

Import Path
	github.com/redis/go-redis/v9/internal/maintnotifications/logs (on go.dev)

Dependency Relation
	imports 4 packages, and imported by 2 packages

Involved Source Files log_messages.go
Package-Level Functions (total 71)
func ApplyingRelaxedTimeoutDueToPostHandoff(connID uint64, timeout interface{}, until string) string
func CircuitBreakerCleanup(removed int, total int) string
func CircuitBreakerClosed(endpoint string, successes int64) string
Circuit breaker functions
func CircuitBreakerOpened(endpoint string, failures int64) string
Circuit breaker additional functions
func ConfigDebug(config interface{}) string
Additional handoff functions for specific cases
Configuration and debug functions
Moving operation tracking functions
ExtractDataFromLogMessage extracts structured data from maintnotifications log messages Returns a map containing the parsed key-value pairs from the structured data section Example: "conn[123] handoff started to localhost:6379 {"connID":123,"endpoint":"localhost:6379"}" Returns: map[string]interface{}{"connID": 123, "endpoint": "localhost:6379"}
func FailedToDialNewEndpoint(connID uint64, endpoint string, err error) string
func FailedToRegisterHandler(notificationType string, err error) string
func HandoffFailed(connID uint64, newEndpoint string, attempt int, maxAttempts int, err error) string
Handoff queue and marking functions
func HandoffRetryAttempt(connID uint64, retries int, newEndpoint string, oldEndpoint string) string
func HandoffStarted(connID uint64, newEndpoint string) string
func HandoffSucceeded(connID uint64, newEndpoint string) string
func InvalidConnectionTypeInHandlerContext(notificationType string, conn interface{}, handlerCtx interface{}) string
func InvalidNewEndpointInMovingNotification(newEndpoint interface{}) string
InvalidNotification creates a log message for invalid notifications of any type
Validation and error functions
func InvalidNotificationTypeFormat(notificationType interface{}) string
Configuration validation error functions
func InvalidSeqIDInMovingNotification(seqID interface{}) string
Cluster notification functions
func InvalidTimeSInMovingNotification(timeS interface{}) string
Pool hook functions
Example hooks functions
func MetricsHookRecordedError(notificationType string, connID uint64, err error) string
func OperationNotTracked(connID uint64, seqID int64) string
Notification processing functions
func ProcessingNotificationFailed(connID uint64, notificationType string, err error, notification interface{}) string
func ProcessingNotificationSucceeded(connID uint64, notificationType string) string
func ReachedMaxHandoffRetries(connID uint64, endpoint string, maxRetries int) string
Timeout-related log functions
Connection pool functions
func TrackingMovingOperation(connID uint64, endpoint string, seqID int64) string
TriggeringClusterStateReload logs when cluster state reload is triggered (deduplicated, once per seqID)
func WorkerExitingDueToInactivityTimeout(timeout interface{}) string
Handoff worker functions
func WorkerPanicRecovered(panicValue interface{}) string
Package-Level Constants (total 72)
const ApplyingRelaxedTimeoutDueToPostHandoffMessage = "applying relaxed timeout due to post-handoff"
const CannotQueueHandoffForRetryMessage = "can't queue handoff for retry"
const CircuitBreakerCleanupMessage = "circuit breaker cleanup"
const CircuitBreakerClosedMessage = "circuit breaker closed"
const CircuitBreakerOpenedMessage = "circuit breaker opened"
const CircuitBreakerOpenErrorMessage = "circuit breaker is open, failing fast"
const CircuitBreakerOpenMessage = "circuit breaker is open, failing fast"
const CircuitBreakerReopenedMessage = "circuit breaker reopened"
======================================== CIRCUIT_BREAKER.GO - Circuit breaker management ========================================
const ConfigDebugMessage = "config debug"
const ConnectionInvalidHandoffStateErrorMessage = "connection is in invalid state for handoff"
const ConnectionMarkedForHandoffErrorMessage = "connection marked for handoff"
const ConnectionNotMarkedForHandoffErrorMessage = "is not marked for handoff"
const ConnectionNotMarkedForHandoffMessage = "is not marked for handoff and has no retries"
======================================== CONFIG.GO - Configuration and debug ========================================
======================================== MANAGER.GO - Moving operation tracking and handler registration ========================================
const FailedToDialNewEndpointMessage = "failed to dial new endpoint"
const FailedToMarkForHandoffMessage = "failed to mark connection for handoff"
======================================== POOL_HOOK.GO - Pool connection management ========================================
const FailedToRegisterHandlerMessage = "failed to register handler"
const HandoffFailedMessage = "handoff failed"
const HandoffQueueFullErrorMessage = "handoff queue is full, cannot queue new handoff requests - consider ...
const HandoffQueueFullMessage = "handoff queue is full"
const HandoffRetryAttemptMessage = "Performing handoff"
======================================== HANDOFF_WORKER.GO - Connection handoff processing ========================================
const HandoffSuccessMessage = "handoff succeeded"
const InvalidCircuitBreakerFailureThresholdErrorMessage = "circuit breaker failure threshold must be >= 1"
const InvalidCircuitBreakerMaxRequestsErrorMessage = "circuit breaker max requests must be >= 1"
const InvalidCircuitBreakerResetTimeoutErrorMessage = "circuit breaker reset timeout must be >= 0"
const InvalidClientErrorMessage = "invalid client type"
const InvalidConnectionTypeInHandlerContextMessage = "invalid connection type in handler context"
const InvalidEndpointTypeErrorMessage = "invalid endpoint type"
const InvalidHandoffQueueSizeErrorMessage = "handoff queue size must be greater than 0"
const InvalidHandoffRetriesErrorMessage = "MaxHandoffRetries must be between 1 and 10"
const InvalidHandoffTimeoutErrorMessage = "handoff timeout must be greater than 0"
const InvalidHandoffWorkersErrorMessage = "MaxWorkers must be greater than or equal to 0"
const InvalidMaintNotificationsErrorMessage = "invalid maintenance notifications setting (must be 'disabled', 'enab...
const InvalidNewEndpointInMovingNotificationMessage = "invalid newEndpoint in MOVING notification"
const InvalidNotificationErrorMessage = "invalid notification format"
======================================== PUSH_NOTIFICATION_HANDLER.GO - Push notification validation and processing ========================================
const InvalidNotificationTypeFormatMessage = "invalid notification type format"
const InvalidPostHandoffRelaxedDurationErrorMessage = "post-handoff relaxed duration must be greater than or equal to 0"
======================================== ERRORS.GO - Error message constants ========================================
const InvalidSeqIDInMovingNotificationMessage = "invalid seqID in MOVING notification"
const InvalidSeqIDInSMigratedNotificationMessage = "invalid SeqID in SMIGRATED notification"
const InvalidSeqIDInSMigratingNotificationMessage = "invalid SeqID in SMIGRATING notification"
const InvalidTimeSInMovingNotificationMessage = "invalid timeS in MOVING notification"
const ManagerNotInitializedMessage = "manager not initialized"
const MarkedForHandoffMessage = "connection marked for handoff"
const MaxHandoffRetriesReachedErrorMessage = "max handoff retries reached"
======================================== EXAMPLE_HOOKS.GO - Example metrics hooks ========================================
const MetricsHookRecordedErrorMessage = "metrics hook recorded error"
const NoConnectionInHandlerContextMessage = "no connection in handler context"
const NoPoolProvidedMessageCannotRemoveMessage = "no pool provided, cannot remove connection, closing it"
const OperationNotTrackedMessage = "operation not tracked"
const ProcessingNotificationFailedMessage = "processing notification failed"
======================================== HOOKS.GO - Notification processing hooks ========================================
const ProcessingNotificationSucceededMessage = "processing notification succeeded"
const ReachedMaxHandoffRetriesMessage = "reached max handoff retries"
const RelaxedTimeoutDueToNotificationMessage = "applying relaxed timeout due to notification"
const RemovingConnectionFromPoolMessage = "removing connection from pool"
const SchedulingHandoffToCurrentEndpointMessage = "scheduling handoff to current endpoint"
const ShutdownErrorMessage = "shutdown"
const TrackingMovingOperationMessage = "tracking MOVING operation"
const TriggeringClusterStateReloadMessage = "triggering cluster state reload"
======================================== used in pool/conn ========================================
const UnrelaxedTimeoutMessage = "clearing relaxed timeout"
const UntrackingMovingOperationMessage = "untracking MOVING operation"
const WorkerExitingDueToInactivityTimeoutMessage = "worker exiting due to inactivity timeout"
const WorkerExitingDueToShutdownMessage = "worker exiting due to shutdown"
const WorkerExitingDueToShutdownWhileProcessingMessage = "worker exiting due to shutdown while processing request"
const WorkerPanicRecoveredMessage = "worker panic recovered"