GitHubIssueStorage
Defined in: storage/github-issue.ts:68
GitHub Issue storage implementation
Type Parameters
Section titled “Type Parameters”T extends QueueItem = QueueItem
Implements
Section titled “Implements”QueueStorage<T>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new GitHubIssueStorage<
T>(options):GitHubIssueStorage<T>
Defined in: storage/github-issue.ts:78
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”GitHubIssueStorage<T>
Methods
Section titled “Methods”acquireLock()
Section titled “acquireLock()”acquireLock(
holder,ttlMs):Promise<boolean>
Defined in: storage/github-issue.ts:124
Acquire a distributed lock
Parameters
Section titled “Parameters”holder
Section titled “holder”string
Identifier for the lock holder
number
Time-to-live in milliseconds
Returns
Section titled “Returns”Promise<boolean>
true if lock acquired, false if already locked
Implementation of
Section titled “Implementation of”getLock()
Section titled “getLock()”getLock():
Promise<QueueLock|null>
Defined in: storage/github-issue.ts:200
Get the current lock info
Returns
Section titled “Returns”Promise<QueueLock | null>
Implementation of
Section titled “Implementation of”isLocked()
Section titled “isLocked()”isLocked():
Promise<boolean>
Defined in: storage/github-issue.ts:195
Check if a lock is currently held
Returns
Section titled “Returns”Promise<boolean>
Implementation of
Section titled “Implementation of”read()
Section titled “read()”read():
Promise<QueueState<T>>
Defined in: storage/github-issue.ts:92
Read the current queue state
Returns
Section titled “Returns”Promise<QueueState<T>>
Implementation of
Section titled “Implementation of”releaseLock()
Section titled “releaseLock()”releaseLock(
holder):Promise<void>
Defined in: storage/github-issue.ts:170
Release a distributed lock
Parameters
Section titled “Parameters”holder
Section titled “holder”string
Must match the holder that acquired the lock
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”write()
Section titled “write()”write(
state):Promise<void>
Defined in: storage/github-issue.ts:105
Write the queue state
Parameters
Section titled “Parameters”QueueState<T>
Returns
Section titled “Returns”Promise<void>