logs

package
v9.16.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2025 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ========================================
	// CIRCUIT_BREAKER.GO - Circuit breaker management
	// ========================================
	CircuitBreakerTransitioningToHalfOpenMessage = "circuit breaker transitioning to half-open"
	CircuitBreakerOpenedMessage                  = "circuit breaker opened"
	CircuitBreakerReopenedMessage                = "circuit breaker reopened"
	CircuitBreakerClosedMessage                  = "circuit breaker closed"
	CircuitBreakerCleanupMessage                 = "circuit breaker cleanup"
	CircuitBreakerOpenMessage                    = "circuit breaker is open, failing fast"

	// ========================================
	// CONFIG.GO - Configuration and debug
	// ========================================
	DebugLoggingEnabledMessage = "debug logging enabled"
	ConfigDebugMessage         = "config debug"

	// ========================================
	// ERRORS.GO - Error message constants
	// ========================================
	InvalidRelaxedTimeoutErrorMessage                 = "relaxed timeout must be greater than 0"
	InvalidHandoffTimeoutErrorMessage                 = "handoff timeout must be greater than 0"
	InvalidHandoffWorkersErrorMessage                 = "MaxWorkers must be greater than or equal to 0"
	InvalidHandoffQueueSizeErrorMessage               = "handoff queue size must be greater than 0"
	InvalidPostHandoffRelaxedDurationErrorMessage     = "post-handoff relaxed duration must be greater than or equal to 0"
	InvalidEndpointTypeErrorMessage                   = "invalid endpoint type"
	InvalidMaintNotificationsErrorMessage             = "invalid maintenance notifications setting (must be 'disabled', 'enabled', or 'auto')"
	InvalidHandoffRetriesErrorMessage                 = "MaxHandoffRetries must be between 1 and 10"
	InvalidClientErrorMessage                         = "invalid client type"
	InvalidNotificationErrorMessage                   = "invalid notification format"
	MaxHandoffRetriesReachedErrorMessage              = "max handoff retries reached"
	HandoffQueueFullErrorMessage                      = "" /* 126-byte string literal not displayed */
	InvalidCircuitBreakerFailureThresholdErrorMessage = "circuit breaker failure threshold must be >= 1"
	InvalidCircuitBreakerResetTimeoutErrorMessage     = "circuit breaker reset timeout must be >= 0"
	InvalidCircuitBreakerMaxRequestsErrorMessage      = "circuit breaker max requests must be >= 1"
	ConnectionMarkedForHandoffErrorMessage            = "connection marked for handoff"
	ConnectionInvalidHandoffStateErrorMessage         = "connection is in invalid state for handoff"
	ShutdownErrorMessage                              = "shutdown"
	CircuitBreakerOpenErrorMessage                    = "circuit breaker is open, failing fast"

	// ========================================
	// EXAMPLE_HOOKS.GO - Example metrics hooks
	// ========================================
	MetricsHookProcessingNotificationMessage = "metrics hook processing"
	MetricsHookRecordedErrorMessage          = "metrics hook recorded error"

	// ========================================
	// HANDOFF_WORKER.GO - Connection handoff processing
	// ========================================
	HandoffStartedMessage                            = "handoff started"
	HandoffFailedMessage                             = "handoff failed"
	ConnectionNotMarkedForHandoffMessage             = "is not marked for handoff and has no retries"
	ConnectionNotMarkedForHandoffErrorMessage        = "is not marked for handoff"
	HandoffRetryAttemptMessage                       = "Performing handoff"
	CannotQueueHandoffForRetryMessage                = "can't queue handoff for retry"
	HandoffQueueFullMessage                          = "handoff queue is full"
	FailedToDialNewEndpointMessage                   = "failed to dial new endpoint"
	ApplyingRelaxedTimeoutDueToPostHandoffMessage    = "applying relaxed timeout due to post-handoff"
	HandoffSuccessMessage                            = "handoff succeeded"
	RemovingConnectionFromPoolMessage                = "removing connection from pool"
	NoPoolProvidedMessageCannotRemoveMessage         = "no pool provided, cannot remove connection, closing it"
	WorkerExitingDueToShutdownMessage                = "worker exiting due to shutdown"
	WorkerExitingDueToShutdownWhileProcessingMessage = "worker exiting due to shutdown while processing request"
	WorkerPanicRecoveredMessage                      = "worker panic recovered"
	WorkerExitingDueToInactivityTimeoutMessage       = "worker exiting due to inactivity timeout"
	ReachedMaxHandoffRetriesMessage                  = "reached max handoff retries"

	// ========================================
	// MANAGER.GO - Moving operation tracking and handler registration
	// ========================================
	DuplicateMovingOperationMessage  = "duplicate MOVING operation ignored"
	TrackingMovingOperationMessage   = "tracking MOVING operation"
	UntrackingMovingOperationMessage = "untracking MOVING operation"
	OperationNotTrackedMessage       = "operation not tracked"
	FailedToRegisterHandlerMessage   = "failed to register handler"

	// ========================================
	// HOOKS.GO - Notification processing hooks
	// ========================================
	ProcessingNotificationMessage          = "processing notification started"
	ProcessingNotificationFailedMessage    = "proccessing notification failed"
	ProcessingNotificationSucceededMessage = "processing notification succeeded"

	// ========================================
	// POOL_HOOK.GO - Pool connection management
	// ========================================
	FailedToQueueHandoffMessage = "failed to queue handoff"
	MarkedForHandoffMessage     = "connection marked for handoff"

	// ========================================
	// PUSH_NOTIFICATION_HANDLER.GO - Push notification validation and processing
	// ========================================
	InvalidNotificationFormatMessage              = "invalid notification format"
	InvalidNotificationTypeFormatMessage          = "invalid notification type format"
	InvalidSeqIDInMovingNotificationMessage       = "invalid seqID in MOVING notification"
	InvalidTimeSInMovingNotificationMessage       = "invalid timeS in MOVING notification"
	InvalidNewEndpointInMovingNotificationMessage = "invalid newEndpoint in MOVING notification"
	NoConnectionInHandlerContextMessage           = "no connection in handler context"
	InvalidConnectionTypeInHandlerContextMessage  = "invalid connection type in handler context"
	SchedulingHandoffToCurrentEndpointMessage     = "scheduling handoff to current endpoint"
	RelaxedTimeoutDueToNotificationMessage        = "applying relaxed timeout due to notification"
	UnrelaxedTimeoutMessage                       = "clearing relaxed timeout"
	ManagerNotInitializedMessage                  = "manager not initialized"
	FailedToMarkForHandoffMessage                 = "failed to mark connection for handoff"

	// ========================================
	// used in pool/conn
	// ========================================
	UnrelaxedTimeoutAfterDeadlineMessage = "clearing relaxed timeout after deadline"
)

Variables

This section is empty.

Functions

func ApplyingRelaxedTimeoutDueToPostHandoff

func ApplyingRelaxedTimeoutDueToPostHandoff(connID uint64, timeout interface{}, until string) string

func CannotQueueHandoffForRetry

func CannotQueueHandoffForRetry(err error) string

func CircuitBreakerCleanup

func CircuitBreakerCleanup(removed int, total int) string

func CircuitBreakerClosed

func CircuitBreakerClosed(endpoint string, successes int64) string

func CircuitBreakerOpen

func CircuitBreakerOpen(connID uint64, endpoint string) string

Circuit breaker functions

func CircuitBreakerOpened

func CircuitBreakerOpened(endpoint string, failures int64) string

func CircuitBreakerReopened

func CircuitBreakerReopened(endpoint string) string

func CircuitBreakerTransitioningToHalfOpen

func CircuitBreakerTransitioningToHalfOpen(endpoint string) string

Circuit breaker additional functions

func ConfigDebug

func ConfigDebug(config interface{}) string

func ConnectionNotMarkedForHandoff

func ConnectionNotMarkedForHandoff(connID uint64) string

Additional handoff functions for specific cases

func ConnectionNotMarkedForHandoffError

func ConnectionNotMarkedForHandoffError(connID uint64) string

func DebugLoggingEnabled

func DebugLoggingEnabled() string

Configuration and debug functions

func DuplicateMovingOperation

func DuplicateMovingOperation(connID uint64, endpoint string, seqID int64) string

Moving operation tracking functions

func ExtractDataFromLogMessage

func ExtractDataFromLogMessage(logMessage string) map[string]interface{}

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

func FailedToDialNewEndpoint(connID uint64, endpoint string, err error) string

func FailedToMarkForHandoff

func FailedToMarkForHandoff(connID uint64, err error) string

func FailedToQueueHandoff

func FailedToQueueHandoff(connID uint64, err error) string

func FailedToRegisterHandler

func FailedToRegisterHandler(notificationType string, err error) string

func HandoffFailed

func HandoffFailed(connID uint64, newEndpoint string, attempt int, maxAttempts int, err error) string

func HandoffQueueFull

func HandoffQueueFull(queueLen, queueCap int) string

Handoff queue and marking functions

func HandoffQueueFullError

func HandoffQueueFullError() string

func HandoffRetryAttempt

func HandoffRetryAttempt(connID uint64, retries int, newEndpoint string, oldEndpoint string) string

func HandoffStarted

func HandoffStarted(connID uint64, newEndpoint string) string

func HandoffSucceeded

func HandoffSucceeded(connID uint64, newEndpoint string) string

func InvalidCircuitBreakerFailureThresholdError

func InvalidCircuitBreakerFailureThresholdError() string

func InvalidCircuitBreakerMaxRequestsError

func InvalidCircuitBreakerMaxRequestsError() string

func InvalidCircuitBreakerResetTimeoutError

func InvalidCircuitBreakerResetTimeoutError() string

func InvalidClientError

func InvalidClientError() string

func InvalidConnectionTypeInHandlerContext

func InvalidConnectionTypeInHandlerContext(notificationType string, conn interface{}, handlerCtx interface{}) string

func InvalidEndpointTypeError

func InvalidEndpointTypeError() string

func InvalidHandoffQueueSizeError

func InvalidHandoffQueueSizeError() string

func InvalidHandoffRetriesError

func InvalidHandoffRetriesError() string

func InvalidHandoffTimeoutError

func InvalidHandoffTimeoutError() string

func InvalidHandoffWorkersError

func InvalidHandoffWorkersError() string

func InvalidMaintNotificationsError

func InvalidMaintNotificationsError() string

func InvalidNewEndpointInMovingNotification

func InvalidNewEndpointInMovingNotification(newEndpoint interface{}) string

func InvalidNotification

func InvalidNotification(notificationType string, notification interface{}) string

InvalidNotification creates a log message for invalid notifications of any type

func InvalidNotificationError

func InvalidNotificationError() string

func InvalidNotificationFormat

func InvalidNotificationFormat(notification interface{}) string

Validation and error functions

func InvalidNotificationTypeFormat

func InvalidNotificationTypeFormat(notificationType interface{}) string

func InvalidPostHandoffRelaxedDurationError

func InvalidPostHandoffRelaxedDurationError() string

func InvalidRelaxedTimeoutError

func InvalidRelaxedTimeoutError() string

Configuration validation error functions

func InvalidSeqIDInMovingNotification

func InvalidSeqIDInMovingNotification(seqID interface{}) string

func InvalidTimeSInMovingNotification

func InvalidTimeSInMovingNotification(timeS interface{}) string

func ManagerNotInitialized

func ManagerNotInitialized() string

func MarkedForHandoff

func MarkedForHandoff(connID uint64) string

Pool hook functions

func MaxHandoffRetriesReachedError

func MaxHandoffRetriesReachedError() string

func MetricsHookProcessingNotification

func MetricsHookProcessingNotification(notificationType string, connID uint64) string

Example hooks functions

func MetricsHookRecordedError

func MetricsHookRecordedError(notificationType string, connID uint64, err error) string

func NoConnectionInHandlerContext

func NoConnectionInHandlerContext(notificationType string) string

func NoPoolProvidedCannotRemove

func NoPoolProvidedCannotRemove(connID uint64, reason error) string

func OperationNotTracked

func OperationNotTracked(connID uint64, seqID int64) string

func ProcessingNotification

func ProcessingNotification(connID uint64, seqID int64, notificationType string, notification interface{}) string

Notification processing functions

func ProcessingNotificationFailed

func ProcessingNotificationFailed(connID uint64, notificationType string, err error, notification interface{}) string

func ProcessingNotificationSucceeded

func ProcessingNotificationSucceeded(connID uint64, notificationType string) string

func ReachedMaxHandoffRetries

func ReachedMaxHandoffRetries(connID uint64, endpoint string, maxRetries int) string

func RelaxedTimeoutDueToNotification

func RelaxedTimeoutDueToNotification(connID uint64, notificationType string, timeout interface{}) string

Timeout-related log functions

func RemovingConnectionFromPool

func RemovingConnectionFromPool(connID uint64, reason error) string

Connection pool functions

func SchedulingHandoffToCurrentEndpoint

func SchedulingHandoffToCurrentEndpoint(connID uint64, seconds float64) string

func ShutdownError

func ShutdownError() string

func TrackingMovingOperation

func TrackingMovingOperation(connID uint64, endpoint string, seqID int64) string

func UnrelaxedTimeout

func UnrelaxedTimeout(connID uint64) string

func UnrelaxedTimeoutAfterDeadline

func UnrelaxedTimeoutAfterDeadline(connID uint64) string

func UntrackingMovingOperation

func UntrackingMovingOperation(connID uint64, seqID int64) string

func WorkerExitingDueToInactivityTimeout

func WorkerExitingDueToInactivityTimeout(timeout interface{}) string

func WorkerExitingDueToShutdown

func WorkerExitingDueToShutdown() string

Handoff worker functions

func WorkerExitingDueToShutdownWhileProcessing

func WorkerExitingDueToShutdownWhileProcessing() string

func WorkerPanicRecovered

func WorkerPanicRecovered(panicValue interface{}) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL