docs: add swagger auto generator

* to generate docs, run `make docs`
* endpoint /swagger/
This commit is contained in:
2023-04-13 11:55:07 +00:00
parent 0e5db7f06f
commit d51e74883d
11 changed files with 224 additions and 9 deletions

View File

@@ -2,8 +2,8 @@ package redis
import (
"context"
"time"
"github.com/grassrootseconomics/cic-custodial/pkg/util"
"github.com/redis/go-redis/v9"
)
@@ -34,7 +34,7 @@ func NewRedisPool(ctx context.Context, o RedisPoolOpts) (*RedisPool, error) {
redisClient := redis.NewClient(redisOpts)
ctx, cancel := context.WithTimeout(ctx, 5*time.Second)
ctx, cancel := context.WithTimeout(ctx, util.SLATimeout)
defer cancel()
if err := redisClient.SetNX(ctx, systemGlobalLockKey, false, 0).Err(); err != nil {