Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Module( "vef:redis", fx.Provide( fx.Annotate( NewClient, fx.OnStart(func(ctx context.Context, client *redis.Client) error { if err := client.Ping(ctx).Err(); err != nil { return fmt.Errorf("failed to connect to redis: %w", err) } return logRedisServerInfo(ctx, client) }), fx.OnStop(func(client *redis.Client) error { logger.Info("Closing Redis client...") return client.Close() }), ), ), )
Module provides Redis client functionality with automatic lifecycle management.
Functions ¶
func HealthCheck ¶
HealthCheck verifies Redis availability for monitoring endpoints.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.