[erlang-questions] Erlang node in golang

Taras Halturin <>
Wed Sep 27 15:37:02 CEST 2017

Hi *,

I've just finished to develop erlang node implementation on golang. Its
based on some parts of https://github.com/goerlang, but totally reworked.
Now you can create your own nodes using golang and send sync/async messages

here is some example...

Node := ergonode.Create("", 21234,
"SecretCookie")completeChan := make(chan bool)gs := new(goGenServ)

n.Spawn(gs, completeChan)
message := etf.Term(etf.Atom("hello"))
// gen_server:call({pname, ''} , hello)to :=
etf.Tuple{etf.Atom("pname"), etf.Atom("")}
answer, err := gs.Call(to, message)
fmt.Printf("Got response: %v\n", answer)
// it's also possible to call using Pid (etf.Pid)answer, err :=
gs.Call(Pid, message)
// gen_server:cast({pname, ''} , hello)to :=
etf.Tuple{etf.Atom("pname"), etf.Atom("")}
gs.Cast(to, message)
// the same way using Pid
gs.Cast(Pid, message)
// simple sending message 'Pid ! hello'
gs.Send(Pid, message)
// to get pid like it does erlang:self()

Grab it here: https://github.com/halturin/ergonode

Any feedback is highly appreciated

Best Regards.
Taras Halturin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170927/456159e9/attachment.html>

More information about the erlang-questions mailing list