| 1 | import { createZodDto } from '@yikart/common' |
| 2 | import { redisConfigSchema } from '@yikart/redis' |
| 3 | import { z } from 'zod' |
| 4 | |
| 5 | export const redlockConfigSchema = z.object({ |
| 6 | redis: redisConfigSchema, |
| 7 | ttl: z.number().optional().default(300), |
| 8 | retryDelay: z.number().optional().default(1000), |
| 9 | retryCount: z.number().optional().default(3), |
| 10 | }) |
| 11 | |
| 12 | export class RedlockConfig extends createZodDto(redlockConfigSchema) {} |
| 13 |