zitadel/internal/auth/repository/eventsourcing/spooler/lock.go
Fabi d8e42744b4
fix: move v2 pkgs (#1331)
* fix: move eventstore pkgs

* fix: move eventstore pkgs

* fix: remove v2 view

* fix: remove v2 view
2021-02-23 15:13:04 +01:00

25 lines
441 B
Go

package spooler
import (
"database/sql"
"time"
es_locker "github.com/caos/zitadel/internal/eventstore/v1/locker"
)
const (
lockTable = "auth.locks"
)
type locker struct {
dbClient *sql.DB
}
func NewLocker(client *sql.DB) *locker {
return &locker{dbClient: client}
}
func (l *locker) Renew(lockerID, viewModel string, waitTime time.Duration) error {
return es_locker.Renew(l.dbClient, lockTable, lockerID, viewModel, waitTime)
}