View Source Ravix.Connection.RequestExecutor (ravix v0.6.3)

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Fetches the current node executor state

Fetches the current node executor state

Callback implementation for GenServer.init/1.

Asynchronously updates the cluster tag for the current node

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

execute(command, conn_state, headers \\ [])

View Source
Link to this function

execute_with_node(command, pid, headers \\ [])

View Source
@spec fetch_node_state(bitstring() | pid()) ::
  {:ok, Ravix.Connection.ServerNode.t()} | {:error, :node_not_found}

Fetches the current node executor state

parameters

Parameters

pid = The PID of the node

returns

Returns

  • {:ok, Ravix.Connection.ServerNode} if there's a node
  • {:error, :node_not_found} if there's not a node with the informed pid
Link to this function

fetch_node_state(url, database)

View Source
@spec fetch_node_state(binary(), binary()) ::
  {:ok, Ravix.Connection.ServerNode.t()} | {:error, :node_not_found}

Fetches the current node executor state

parameters

Parameters

url = The node url database = the node database name

returns

Returns

  • {:ok, Ravix.Connection.ServerNode} if there's a node
  • {:error, :node_not_found} if there's not a node with the informed pid

Callback implementation for GenServer.init/1.

@spec start_link(any(), Ravix.Connection.ServerNode.t()) ::
  :ignore | {:error, any()} | {:ok, pid()}
Link to this function

update_cluster_tag(url, database, cluster_tag)

View Source
@spec update_cluster_tag(String.t(), String.t(), String.t()) :: :ok

Asynchronously updates the cluster tag for the current node

parameters

Parameters

  • url: Node url
  • database: Database name
  • cluster_tag: new cluster tag

returns

Returns

  • :ok