Stone v0.2.0 Stone.GenServer

This is the module to use in your code if you want to start using functionality that allows you to code GenServers quicker.

Example

defmodule CounterAgent do
  use Stone.GenServer

  defstart start_link(val \\ 0) do
    initial_state(val)
  end
end

Options

  • :singleton - set it to an atom you want to register your server under using :name. It changes definition of interface functions, so that they do not accept pid argument anymore.

For more information about what you can define inside the module, please check Stone.Operations and Stone.Responders.