Packages
cloister
0.3.1
0.18.1
0.18.0
0.17.3
0.17.2
0.17.1
0.17.0
0.16.0
0.15.0
0.14.0
0.13.0
0.12.5
0.12.4
0.12.3
0.12.2
0.12.1
0.12.0
0.11.0
0.10.3
0.10.2
0.10.1
0.10.0
0.9.0
0.8.0
0.7.5
0.7.4
0.7.3
0.7.2
0.7.1
0.7.0
0.6.5
0.6.4
0.6.3
retired
0.6.2
retired
0.6.1
retired
0.6.0
retired
0.5.0
0.4.4
0.4.3
0.4.2
0.4.1
0.4.0
0.3.9
0.3.8
0.3.7
0.3.6
0.3.5
0.3.4
0.3.3
0.3.2
0.3.1
0.3.0
0.2.2
0.2.1
0.2.0
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
The helper application to manage cluster, that uses hash ring to route requests to nodes. Automatically keeps track of connected nodes, provides helpers to determine where the term is to be executed, to multicast to all the nodes in the cluster and to retrieve current state of the cluster.
Current section
59 Versions
Jump to
Current section
59 Versions
Compare versions
4
files changed
+7
additions
-5
deletions
| @@ -28,4 +28,4 @@ | |
| 28 28 | {<<"optional">>,false}, |
| 29 29 | {<<"repository">>,<<"hexpm">>}, |
| 30 30 | {<<"requirement">>,<<"~> 0.4">>}]]}. |
| 31 | - {<<"version">>,<<"0.3.0">>}. |
| 31 | + {<<"version">>,<<"0.3.1">>}. |
| @@ -6,7 +6,7 @@ defmodule Cloister.Monitor do | |
| 6 6 | |
| 7 7 | require Logger |
| 8 8 | |
| 9 | - @type status :: :down | :starting | :up | :stopping | :rehashing | :panic |
| 9 | + @type status :: :down | :starting | :joined | :up | :stopping | :rehashing | :panic |
| 10 10 | |
| 11 11 | @type t :: %{ |
| 12 12 | __struct__: Cloister.Monitor, |
| @@ -32,7 +32,7 @@ defmodule Cloister.Monitor do | |
| 32 32 | alias Cloister.Monitor, as: Mon |
| 33 33 | |
| 34 34 | # millis |
| 35 | - @refresh_rate 1_000 |
| 35 | + @refresh_rate 300 |
| 36 36 | |
| 37 37 | @spec start_link(opts :: keyword()) :: GenServer.on_start() |
| 38 38 | def start_link(opts \\ []) do |
| @@ -98,7 +98,7 @@ defmodule Cloister.Monitor do | |
| 98 98 | clustered?: true |
| 99 99 | } |
| 100 100 | |
| 101 | - {:noreply, notify(:up, state)} |
| 101 | + {:noreply, notify(:joined, state)} |
| 102 102 | else |
| 103 103 | {:noreply, state, {:continue, :quorum}} |
| 104 104 | end |
| @@ -15,6 +15,8 @@ defmodule Cloister.Modules do | |
| 15 15 | _ -> |
| 16 16 | ast = |
| 17 17 | quote do |
| 18 | + @moduledoc false |
| 19 | + |
| 18 20 | @spec whois(term :: term()) :: node() |
| 19 21 | def whois(term) do |
| 20 22 | case HashRing.Managed.key_to_node(unquote(ring), term) do |
| @@ -2,7 +2,7 @@ defmodule Cloister.MixProject do | |
| 2 2 | use Mix.Project |
| 3 3 | |
| 4 4 | @app :cloister |
| 5 | - @version "0.3.0" |
| 5 | + @version "0.3.1" |
| 6 6 | |
| 7 7 | def project do |
| 8 8 | [ |