servicecomb-service-center
servicecomb-service-center copied to clipboard
how to implement the feature of cipher plugin in service-center?
Describe the bug
When I use tls feature in service-center(Reference Example of plugin.md -> # Plug-in mechanism), I got an error of,
ERROR plugin/loader.go:53 no any plugin has been loaded {"error": "load plugin 'cipher' error for plugin: not implemented"}
To Reproduce Steps to reproduce the behavior:
- create a go file to implement the Cipher interface
package main
func Encrypt(src string) (string, error) {
return src,nil
}
func Decrypt(src string) (string, error) {
return src,nil
}
- compile go file to generate so
GOPATH=go build -o cipher_plugin.so -buildmode=plugin cipher_plugin.go
- move the cipher_plugin.so to plugins directory
- restart service-center and then I see error
If I remove the cipher_plugin.go from plugins dir, and with plaintext password in cert_pwd file , The tls feature is normal
Expected behavior A clear and concise description of what you expected to happen.
Platform And Runtime (please complete the following information):
https://go-chassis.readthedocs.io/en/latest/dev-guides/codec.html
cipher plugin is using go chassis plugin now. do not use go plugin
我用的是1.3.0 版本的 通过上述步骤 也是同样的报错?是不是版本有问题不支持吗? ERROR plugin/loader.go:53 no any plugin has been loaded {"error": "load plugin 'cipher' error for plugin: not implemented"}