Documentation ¶
Index ¶
- type Lock
- type LockDB
- type SQLDB
- func (db *SQLDB) Count(ctx context.Context, logger lager.Logger, lockType string) (int, error)
- func (db *SQLDB) CreateLockTable(ctx context.Context, logger lager.Logger) error
- func (db *SQLDB) Fetch(ctx context.Context, logger lager.Logger, key string) (*Lock, error)
- func (db *SQLDB) FetchAll(ctx context.Context, logger lager.Logger, lockType string) ([]*Lock, error)
- func (db *SQLDB) FetchAndRelease(ctx context.Context, logger lager.Logger, lock *Lock) (bool, error)
- func (db *SQLDB) Lock(ctx context.Context, logger lager.Logger, resource *models.Resource, ttl int64) (*Lock, error)
- func (db *SQLDB) Release(ctx context.Context, logger lager.Logger, resource *models.Resource) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LockDB ¶
type LockDB interface { Lock(ctx context.Context, logger lager.Logger, resource *models.Resource, ttl int64) (*Lock, error) Release(ctx context.Context, logger lager.Logger, resource *models.Resource) error Fetch(ctx context.Context, logger lager.Logger, key string) (*Lock, error) FetchAndRelease(ctx context.Context, logger lager.Logger, lock *Lock) (bool, error) FetchAll(ctx context.Context, logger lager.Logger, lockType string) ([]*Lock, error) Count(ctx context.Context, logger lager.Logger, lockType string) (int, error) }
type SQLDB ¶
type SQLDB struct { helpers.QueryableDB // contains filtered or unexported fields }
func NewSQLDB ¶
func NewSQLDB( db helpers.QueryableDB, flavor string, guidProvider guidprovider.GUIDProvider, ) *SQLDB
func (*SQLDB) CreateLockTable ¶
func (*SQLDB) FetchAndRelease ¶
Click to show internal directories.
Click to hide internal directories.