Merge pull request #78 from cerc-io/fix-subscription-methods
Fix subscription method registration
This commit is contained in:
commit
366f480bc1
@ -77,7 +77,7 @@ func NewPluginLoader(target string) (*PluginLoader, error) {
|
||||
}
|
||||
plug, err := plugin.Open(fpath)
|
||||
if err != nil {
|
||||
log.Warn("File in plugin directory could not be loaded: %v", "file", fpath, "error", err.Error())
|
||||
log.Warn("File in plugin directory could not be loaded", "file", fpath, "error", err)
|
||||
continue
|
||||
}
|
||||
// Any type of plugin can potentially specify flags
|
||||
|
@ -63,6 +63,9 @@ func (r *serviceRegistry) registerName(name string, rcvr interface{}) error {
|
||||
return fmt.Errorf("no service name for type %s", rcvrVal.Type().String())
|
||||
}
|
||||
callbacks := suitableCallbacks(rcvrVal)
|
||||
// begin PluGeth code injection
|
||||
pluginExtendedCallbacks(callbacks, rcvrVal)
|
||||
// end PluGeth code injection
|
||||
if len(callbacks) == 0 {
|
||||
return fmt.Errorf("service %T doesn't have any suitable methods/subscriptions to expose", rcvr)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user