Versions in this module Expand all Collapse all v1 v1.2.0 Feb 7, 2023 v1.1.1 Feb 7, 2023 Changes in this version + func Init() + func SetRedisPoolConfig(c *PoolTimeConfig) + type IdempotenceStorage int8 + const Mongo + const Redis + type PoolTimeConfig struct + IdleTimeout time.Duration + InitialCap int + MaxCap int + MaxIdle int + type RedisStorage struct + func NewRedisStorage() *RedisStorage + func (idempotence *RedisStorage) CheckAndSetStatus(id string, status []string, newStatus string, t int) bool + func (idempotence *RedisStorage) CheckStatus(id string, status []string) bool + func (idempotence *RedisStorage) Delete(idempotenceID id.IdempotenceID) bool + func (idempotence *RedisStorage) SaveIfAbsent(idempotenceID id.IdempotenceID) bool + func (idempotence *RedisStorage) SaveStatusIfAbsent(id, status string, t time.Duration) bool + type Storage interface + CheckAndSetStatus func(id string, status []string, newStatus string, t int) bool + CheckStatus func(id string, status []string) bool + Delete func(idempotenceID id.IdempotenceID) bool + SaveIfAbsent func(idempotenceID id.IdempotenceID) bool + SaveStatusIfAbsent func(id, status string, t time.Duration) bool + func NewStorage(s IdempotenceStorage) Storage