pollin v0.2.1 Pollin.Backend.Memory.CallbackWorker
Worker for callbacks
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
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 phase of a callback
Link to this section Functions
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor
.
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, %{phase: "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_phase(id, key, phase)
Update phase of a callback
Example
CallbackWorker.update_phase(id, key, phase)