pollin v0.1.0 Pollin.Backend.Memory.CallbackWorker

Worker for callbacks

Summary

Functions

Count all callbacks of an endpoint

Count all callbacks of an endpoint with filter options

Remove a callback

Dump all callbacks of an endpoint

Pop a callback from endpoint

Fetch list of callbacks from endpoint queue by given offset and limit

Fetch reverse list of callbacks from endpoint queue by given offset and limit

Pop a callback from endpoint

Pop list of callbacks from endpoint queue by given options offset and limit

Push a callback resource to an endpoint

Reset all callbacks of an endpoint

Update status of a callback

Functions

count(id)

Count all callbacks of an endpoint

Example

count = CallbackWorker.count(id)
count(id, opts)

Count all callbacks of an endpoint with filter options

Example

count = CallbackWorker.count(id, %{status: "unprocessed"})
delete(id, key)

Remove a callback

Example

CallbackWorker.delete(id, key)
dump(id)

Dump all callbacks of an endpoint

Example

callbacks = CallbackWorker.count(id)
fetch(id)

Pop a callback from endpoint

Example

callback = CallbackWorker.fetch(id)
fetch(id, key)

Fetch list of callbacks from endpoint queue by given offset and limit

Example

callbacks = CallbackWorker.fetch(id, opts)
fetch_reverse(id, opts)

Fetch reverse list of callbacks from endpoint queue by given offset and limit

Example

callbacks = CallbackWorker.fetch(id, opts)
pop(id)

Pop a callback from endpoint

Example

callback = CallbackWorker.pop(id)
pop(id, key)

Pop list of callbacks from endpoint queue by given options offset and limit

Example

callbacks = CallbackWorker.pop(id, opts)
push(id, callback, secret \\ "")

Push a callback resource to an endpoint

Example

CallbackWorker.push(id, %Pollin.Resource.Callback{})
reset(id)

Reset all callbacks of an endpoint

Example

CallbackWorker.reset(id)
update_status(id, key, status)

Update status of a callback

Example

CallbackWorker.update_status(id, key, status)