Comments (10)
Hi, sorry for delay with answer.
I'm happy to hear that this project is useful and can be a painkiller for you :). I will try to look it deeper a bit later, but you are welcome to make PR
from ergo.
Hi, no problem!
I will look into it and see if I can put together a pull request! So far it's working really great. Probably the best way to integrate golang libraries with erlang.
Maybe now with the introduction of go modules it can also be built as part of a rebar3 application.
from ergo.
Hi a small question.
how to convert the int parameters in gen server call
sample call
gen_server:call({examplegs,'test@localhost'}, {getZrange,{num_list_11111111,2}}).
i can get getZrange and num_list_11111111 but {2...) gives error
if i change 2 in to a string then its working
gen_server:call({examplegs,'test@localhost'}, {getZrange,{num_list_11111111,'2'}}).
Call recovered: &runtime.TypeAssertionError{_interface:(*runtime._type)(0x8be3a0), concrete:(*runtime._type)(0x88f380), asserted:(*runtime._type)(0x88e880), missingMethod:""}
please help me on this
from ergo.
@ciyrus could you please show me your implementation of genserver
from ergo.
Thank You for the reply
Im new to both Go and Erlang. so pls ignore if any mistakes are there
just executing below in Erlang shell
gen_server:call({examplegs,'test@localhost'}, {getZrange}).
in go implementation i'm getting the parameters like below
c := req[0].(etf.Atom)
println(c)
input 1
gen_server:call({examplegs,'test@localhost'}, {getZrange}).
output 1 in go
getZrange
input 2 (changed getZrange to an integer)
gen_server:call({examplegs,'test@localhost'}, {100}).
output 2 in go
Call recovered: &runtime.TypeAssertionError{_interface:(*runtime._type)(0x8be3a0), concrete:(*runtime._type)(0x88f380), asserted:(*runtime._type)(0x88e880), missingMethod:""}
from ergo.
The reason of this behavior due to this line
c := req[0].(etf.Atom)
It's expected an atom, not an integer.
from ergo.
Can u please guide how to convert it to integer.
Because I tried following and got the same error
strconv.Atoi
strconv.ParseInt
from ergo.
Please, have a look this example
https://github.com/halturin/ergonode/blob/master/examples/gonode.go
Especially line 48.
from ergo.
Thanks a lot. found it. need to check the type first... that's what i missed
Once again Thanks a lot
from ergo.
i've just merged a bunch of updates, so its not valid anymore
from ergo.
Related Issues (20)
- GitHub actions fail on all platforms due to integration E2E tests HOT 1
- Unittest `TestDecodeFragment` occasionally fails
- i found rpc:call from erlang to ergo is not working HOT 2
- Ergo receives DIST packet along with the HANDSHAKE final packet. HOT 1
- Second CallRPC method is stuck when it is called against remote erlang node HOT 3
- Does Ergo have a plan to support OTP25/OTP26? HOT 1
- how to use simple_one_for_one under supervisor tree HOT 4
- Panic invalid memory address after reconnect a node HOT 6
- bug for deleteProcess HOT 3
- bug for (*process).UnregisterName HOT 2
- I doubt benchmarks be fair !!! HOT 3
- How to change Logger HOT 2
- gen.TcpHandle Question HOT 10
- When I close it frequently, there will be an unrecoverable panic. HOT 3
- Increase test coverage to 80% HOT 2
- node link problem? How to find HOT 8
- node link problem? HOT 2
- Support for Erlang/OTP 26 HOT 1
- Node.Stop () and node.Wait () will immediately end the process HOT 2
- PoolBehavior does not add restarted process to pool.monitors HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ergo.