diff --git a/redis/count_resource.go b/redis/count_resource.go index fcb0113..8ac39ef 100644 --- a/redis/count_resource.go +++ b/redis/count_resource.go @@ -301,7 +301,7 @@ func (cr *CountResource) Available(ctx context.Context, tenantID string) (int64, } // count is now zero so check the actual number of resources and adjust if necessary. - newLimit, err := cr.refreshLimit(ctx, tenantID) + newLimit, err := cr.RefreshLimit(ctx, tenantID) if err != nil { log.Infof("reset count failure: %v", err) newLimit = limit diff --git a/redis/resource.go b/redis/resource.go index 86d8eaa..c9ab3c3 100644 --- a/redis/resource.go +++ b/redis/resource.go @@ -285,11 +285,11 @@ func (r *Resource) getLimit(ctx context.Context, tenantID string) (int64, error) return limit, nil } // we haven't got the redis limit therefore attempt to retrieve from upstream - return r.refreshLimit(ctx, tenantID) + return r.RefreshLimit(ctx, tenantID) } -// refreshLimit gets the limit for a given tenant from upstream. -func (r *Resource) refreshLimit(ctx context.Context, tenantID string) (int64, error) { +// RefreshLimit gets the limit for a given tenant from upstream. +func (r *Resource) RefreshLimit(ctx context.Context, tenantID string) (int64, error) { log := r.Log().FromContext(ctx) defer log.Close()