NSQ.Connection.Command (elixir_nsq v1.2.0)

Both consumers and producers use Connection, which, at a lower level, kicks off message processing and issues commands to NSQD. This module handles some of the trickier command queueing, flushing, etc.

Summary

Functions

Link to this function

exec(state, cmd, kind, from)

Link to this function

flush_cmd_queue(state)

@spec flush_cmd_queue(NSQ.Connection.state()) :: NSQ.Connection.state()
Link to this function

flush_cmd_queue!(state)

Link to this function

send_data_and_queue_resp(state, cmd, from, kind)

@spec send_data_and_queue_resp(
  NSQ.Connection.state(),
  tuple(),
  {reference(), pid()},
  atom()
) ::
  NSQ.Connection.state()
Link to this function

send_response_to_caller(state, data)

@spec send_response_to_caller(NSQ.Connection.state(), binary()) ::
  {:ok, NSQ.Connection.state()}
Link to this function

update_state_from_cmd(cmd, state)

@spec update_state_from_cmd(tuple(), NSQ.Connection.state()) :: NSQ.Connection.state()