feat(auth): upgrade casbin to v3 and enhance connection pool configurations
- Upgrade casbin from v2 to v3 across go.mod and pkg/auth/casbin.go - Add slide captcha verification to registration flow (CheckVerified, ConsumeVerified) - Add DB wrapper with connection pool statistics and health checks - Add Redis connection pool optimizations with stats and health monitoring - Add new config options: ConnMaxLifetime, HealthCheckInterval, EnableRetryOnError - Optimize slow query threshold from 200ms to 100ms - Add ping with retry mechanism for database and Redis connections
This commit is contained in:
@@ -100,6 +100,8 @@ type VerificationService interface {
|
||||
type CaptchaService interface {
|
||||
Generate(ctx context.Context) (masterImg, tileImg, captchaID string, y int, err error)
|
||||
Verify(ctx context.Context, dx int, captchaID string) (bool, error)
|
||||
CheckVerified(ctx context.Context, captchaID string) (bool, error)
|
||||
ConsumeVerified(ctx context.Context, captchaID string) error
|
||||
}
|
||||
|
||||
// YggdrasilService Yggdrasil服务接口
|
||||
|
||||
Reference in New Issue
Block a user