[erlang-questions] Custom behavior background information
Frans Schneider
schneider@REDACTED
Tue Sep 15 10:04:06 CEST 2015
Hi list,
I find myself repeating code in several gen_server and gen_fsm behavior
based modules. These modules should all share about eight functions, all
doing exactly the same thing. On top of these modules, more elaborate
modules with common functions have to be defined, adding four or so
functions. To me, this is looking like defining my own custom behaviors.
I had a look at the implementation of the Erlang supervisor for
extending the gen_server behavior which gives enough information to get
something working. However, I have no glue how to extend the gen_fsm
behavior and keep the interface to defining states in the new behavior.
So, what I am looking for is some reference material on writing custom
behaviors on top of what Erlang central and the OTP documentation offer.
TIA,
Frans
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150915/34de98db/attachment.htm>
More information about the erlang-questions
mailing list