Skip to content

termoose/EasyServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EasyServer

Note: Saša Jurić has a much more complete library available: https://github.com/sasa1977/exactor

Tired of defining your handle_call or handle_cast functions as well as the client functions for issuing the GenServer.call and GenServer.cast? Look no further!

Add the library to your deps in mix.exs:

{:easy_server, "~> 0.0.1"}

Example usage

use EasyServer

cast(:push, state, element) do
    {:noreply, [element | state]}
end

call(:pop, [h | t], _from) do
    {:reply, h, t}
end

You can implement handle_info etc. as you normally would with GenServer. Check easy_server_test.exs for example usage.

About

Easy to use macro for Elixir GenServer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages