Open mytototo opened 4 years ago
Hi,
I am migrating Go plugins to this library because there are too many drawbacks using the standard library.
Is it possible for functions of interfaces to return another interface living in the same plugin? If so, how does the common RPC client look like?
How can I pass several args down to the plugin?
I have a common interface like this:
type Example interface { InternalOtherInterface(arg1 string, arg2 string) InternalOtherInterface }
Using the RPC client I usually write something like this (when not returning interface):
func (p *PluginClient) InternalOtherInterface() InternalOtherInterface { var oa OtherInterface err := p.client.Call("Plugin.InternalOtherInterface", new(interface{}), &oa) if err != nil { /// } /// return oa }
The error provoking the panic is the following:
rpc: gob error encoding body: gob: type not registered for interface: main.internalotherinterface
Thank you for your time.
EDIT: Add question about args.
@mytototo I am having a similar problem and trying to do the same thing. Did you find any solution or any answer for me?
Hi,
I am migrating Go plugins to this library because there are too many drawbacks using the standard library.
Is it possible for functions of interfaces to return another interface living in the same plugin? If so, how does the common RPC client look like?
How can I pass several args down to the plugin?
I have a common interface like this:
Using the RPC client I usually write something like this (when not returning interface):
The error provoking the panic is the following:
Thank you for your time.
EDIT: Add question about args.