MCPcopy Index your code
hub / github.com/coder/coder / AcquireLock

Method AcquireLock

coderd/database/querier.go:24–24  ·  view source on GitHub ↗

Blocks until the lock is acquired. This must be called from within a transaction. The lock will be automatically released when the transaction ends.

(ctx context.Context, pgAdvisoryXactLock int64)

Source from the content-addressed store, hash-verified

22 // This must be called from within a transaction. The lock will be automatically
23 // released when the transaction ends.
24 AcquireLock(ctx context.Context, pgAdvisoryXactLock int64) error
25 // Acquires the lease for a given count of notification messages, to enable concurrent dequeuing and subsequent sending.
26 // Only rows that aren't already leased (or ones which are leased but have exceeded their lease period) are returned.
27 //

Callers 11

SeedAIProvidersFromEnvFunction · 0.65
ReconcileSystemRolesFunction · 0.65
AcquireLockMethod · 0.65
AcquireLockMethod · 0.65
FlushToDBMethod · 0.65
rotateKeysMethod · 0.65
ServerMethod · 0.65
postOrganizationsMethod · 0.65
ServerMethod · 0.65

Implementers 5

sqlQueriercoderd/database/db.go
queryMetricsStorecoderd/database/dbmetrics/querymetrics
queriercoderd/database/dbauthz/dbauthz.go
MockStorecoderd/database/dbmock/dbmock.go
MockStoreMockRecordercoderd/database/dbmock/dbmock.go

Calls

no outgoing calls

Tested by

no test coverage detected