Initial commit: Open sourcing all of the Maple Open Technologies code.
This commit is contained in:
commit
755d54a99d
2010 changed files with 448675 additions and 0 deletions
13
cloud/maplepress-backend/pkg/distributedmutex/provider.go
Normal file
13
cloud/maplepress-backend/pkg/distributedmutex/provider.go
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
package distributedmutex
|
||||
|
||||
import (
|
||||
"github.com/redis/go-redis/v9"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
// ProvideDistributedMutexAdapter creates a new distributed mutex adapter instance.
|
||||
// Accepts *redis.Client which implements redis.UniversalClient interface
|
||||
func ProvideDistributedMutexAdapter(logger *zap.Logger, redisClient *redis.Client) Adapter {
|
||||
// redis.Client implements redis.UniversalClient, so we can pass it directly
|
||||
return NewAdapter(logger, redisClient)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue