annon_api v0.16.2 Annon.Requests.LogWriter
This module provides interface to synchronously or asynchronously create Log Entries.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor
Creates a Request
Asynchronously creates a Request. If request insert operations is failed, error is logged to a console
Start a LogWriter worker
Link to this section Functions
Link to this function
child_spec(arg)
Returns a specification to start this module under a supervisor.
See Supervisor
.
Link to this function
create_request(attrs)
Creates a Request.
Examples
iex> create_request(%{field: value})
{:ok, %Annon.Requests.Request{}}
iex> create_request(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Link to this function
create_request_async(attrs)
Asynchronously creates a Request. If request insert operations is failed, error is logged to a console.
Examples
iex> create_request(%{field: value})
:ok
iex> create_request(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Link to this function
start_link()
Start a LogWriter worker.
Link to this function
subscribe(name_or_pid)
Link to this function
unsubscribe(name_or_pid)