简体   繁体   中英

Call rpc from Erlang node to Elixir node

I am trying to call rpc from Erlang to Elixir, I get:

rpc:call(chat@localhost, 'Node' , 'list', []).

{badrpc,{'EXIT',{undef,[{'Node',list,[],[]},
                        {rpc,'-handle_call_call/6-fun-0-',5,
                             [{file,"rpc.erl"},{line,197}]}]}}}

Whats the proper syntax for achieving this simple call?

When Elixir code gets compiled, the module names actually become Elixir.Module . So in order to call an Elixir module from Erlang, you will need to use 'Elixir.Module' . In this case,

rpc:call('chat@localhost', 'Elixir.Node', list, [])

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM