virtuoso v0.0.2 Virtuoso.Conversation

GenServer to maintain conversation state

Link to this section Summary

Types

Sender id for facebook messages

Conversation state

Functions

Ensure a process is alive before sending data to it

Helper for determining a conversation registered process name

A message is received. Ensure the process is alive and forward it

A message is sent. Ensure the process is alive and forward it

Terminate a conversation process

Link to this section Types

Link to this type sender_id()
sender_id() :: String.t()

Sender id for facebook messages

Link to this type state()
state() :: %Virtuoso.Conversation.State{environment: term(), last_recieved_at: term(), messages: term(), pid: term(), sender_id: term()}

Conversation state

Link to this section Functions

Link to this function ensure_process(sender_id)
ensure_process(sender_id()) :: :ok

Ensure a process is alive before sending data to it

Link to this function pid(sender_id)
pid(sender_id()) :: tuple()

Helper for determining a conversation registered process name

Link to this function received_message(entry)
received_message(map()) :: :ok

A message is received. Ensure the process is alive and forward it

Link to this function sent_message(sender_id, response)
sent_message(sender_id(), map()) :: :ok

A message is sent. Ensure the process is alive and forward it

Link to this function terminate(sender_id)
terminate(sender_id()) :: :ok

Terminate a conversation process