You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to wrap Websockex with GenStage but there are some minor gaps between the interfaces since GenStage is built on top of GenServer. In particular, there's typically an init callback which allows the server to initialize the state based on arguments, rather than just directly using whatever state the client passed to start_link. Also, while I can probably work around it with GenStage by avoiding synchronous stuff, it would make it waaaay simpler if Websockex supported synchronous requests (i.e. handle_call). Then you could basically just drop in GenServer-style behaviors.
The text was updated successfully, but these errors were encountered:
jotakami
changed the title
Add init callback like GenServer
Add init and handle_call to seamlessly support behaviors designed around GenServer
Jun 19, 2021
I'm trying to wrap Websockex with GenStage but there are some minor gaps between the interfaces since GenStage is built on top of GenServer. In particular, there's typically an
init
callback which allows the server to initialize the state based on arguments, rather than just directly using whatever state the client passed tostart_link
. Also, while I can probably work around it with GenStage by avoiding synchronous stuff, it would make it waaaay simpler if Websockex supported synchronous requests (i.e.handle_call
). Then you could basically just drop in GenServer-style behaviors.The text was updated successfully, but these errors were encountered: