Documentation ¶
Index ¶
- type DBTX
- type GetLeaseInfoRow
- type Querier
- type Queries
- func (q *Queries) ExpireLeases(ctx context.Context) (int64, error)
- func (q *Queries) GetLeaseInfo(ctx context.Context, key leases.Key) (GetLeaseInfoRow, error)
- func (q *Queries) NewLease(ctx context.Context, key leases.Key, ttl sqltypes.Duration, ...) (uuid.UUID, error)
- func (q *Queries) ReleaseLease(ctx context.Context, idempotencyKey uuid.UUID, key leases.Key) (bool, error)
- func (q *Queries) RenewLease(ctx context.Context, ttl sqltypes.Duration, idempotencyKey uuid.UUID, ...) (bool, error)
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetLeaseInfoRow ¶
type GetLeaseInfoRow struct { ExpiresAt time.Time Metadata pqtype.NullRawMessage }
type Querier ¶
type Querier interface { ExpireLeases(ctx context.Context) (int64, error) GetLeaseInfo(ctx context.Context, key leases.Key) (GetLeaseInfoRow, error) NewLease(ctx context.Context, key leases.Key, ttl sqltypes.Duration, metadata pqtype.NullRawMessage) (uuid.UUID, error) ReleaseLease(ctx context.Context, idempotencyKey uuid.UUID, key leases.Key) (bool, error) RenewLease(ctx context.Context, ttl sqltypes.Duration, idempotencyKey uuid.UUID, key leases.Key) (bool, error) }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) GetLeaseInfo ¶
func (*Queries) ReleaseLease ¶
func (*Queries) RenewLease ¶
Click to show internal directories.
Click to hide internal directories.