View Source Antikythera.Registry.Group (antikythera v0.5.1)
A global (cluster-wide) process registry for implementing publisher-subscriber communication pattern.
In this registry you can register multiple processes with the same name. Then you can broadcast a message to the group of processes having the same name. Group names can be arbitrary string. Each process can join multiple groups at the same time. When the registered process dies its pid will be automatically removed from all the groups that the process has joined.
Summary
Functions
@spec join(String.t(), Antikythera.ExecutorPool.Id.t() | Antikythera.Context.t()) :: :ok
@spec leave(String.t(), Antikythera.ExecutorPool.Id.t() | Antikythera.Context.t()) :: :ok | {:error, :pid_not_in_group}
@spec publish( String.t(), Antikythera.ExecutorPool.Id.t() | Antikythera.Context.t(), any() ) :: non_neg_integer()