Versions in this module Expand all Collapse all v1 v1.0.2 May 8, 2026 v1.0.1 Apr 9, 2026 Changes in this version + var DefaultIdKeyFormat = "id:type:%s" + var DefaultIdLockTimeout = time.Second * 3 + type IdClusterHandler struct + func NewIdClusterHandler(dbService db.IService, redisService redis.IService) (res *IdClusterHandler) + func (this_ *IdClusterHandler) CacheId(ctx context.Context, idType module_id.IdType, id int64) error + func (this_ *IdClusterHandler) FormatIdKey(idType module_id.IdType) string + func (this_ *IdClusterHandler) Increment(ctx context.Context, idType module_id.IdType, size int64) (int64, error) + func (this_ *IdClusterHandler) PersistLock(ctx context.Context, idType module_id.IdType) (unlocker module_id.Unlocker, err error) + func (this_ *IdClusterHandler) RecoverLock(ctx context.Context, idType module_id.IdType) (unlocker module_id.Unlocker, err error) + func (this_ *IdClusterHandler) ShouldCheckAndPersist() bool + func (this_ *IdClusterHandler) WithIdKey(idKeyFormat string) *IdClusterHandler + func (this_ *IdClusterHandler) WithLockTimeout(lockTimeout time.Duration) *IdClusterHandler + type RedisUnlocker struct + func (this_ *RedisUnlocker) Unlock()