View Source Ravix.Connection.RequestExecutor.Supervisor (ravix v0.0.2)

Supervises the Requests Executors processes

Each node connection has it own supervised process, so they are completely isolated from each other. All executors are registered under the :request_executors Registry.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Fetches the nodes running for a specific store

Callback implementation for DynamicSupervisor.init/1.

Register a new RavenDB Database node for the informed store

Triggers a topology update for all nodes of a specific store

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

@spec fetch_nodes(any()) :: [pid()]

Fetches the nodes running for a specific store

parameters

Parameters

  • store: the store module: E.g: Ravix.TestStore

returns

Returns

  • List of PIDs
@spec init(any()) ::
  {:ok,
   %{
     extra_arguments: list(),
     intensity: non_neg_integer(),
     max_children: :infinity | non_neg_integer(),
     period: pos_integer(),
     strategy: :one_for_one
   }}

Callback implementation for DynamicSupervisor.init/1.

Link to this function

register_node_executor(store, node)

View Source
@spec register_node_executor(any(), Ravix.Connection.ServerNode.t()) ::
  :ignore | {:error, any()} | {:ok, pid()} | {:ok, pid(), any()}

Register a new RavenDB Database node for the informed store

parameters

Parameters

  • store: the store module. E.g: Ravix.TestStore
  • node: the node to be registered
@spec start_link(any()) :: :ignore | {:error, any()} | {:ok, pid()}
Link to this function

update_topology(store, topology)

View Source
@spec update_topology(any(), Ravix.Connection.Topology.t()) :: [
  new_nodes: list(),
  updated_nodes: list()
]

Triggers a topology update for all nodes of a specific store

parameters

Parameters

returns

Returns

  • List of nodes [new_nodes: list(Ravix.Connection.ServerNode), updated_nodes: list(Ravix.Connection.ServerNode)]