- Go version 1.8(+)
- Compile service-center with GO_EXTLINK_ENABLED=1 and CGO_ENABLED=1
- The plugin file name must has suffix '_plugin.so'
- All plugin interface files are in infra package
- auth: Customize authentication of service-center.
- uuid: Customize micro-service/instance id format.
- auditlog: Customize audit log for any change done to the service-center.
- cipher: Customize encryption and decryption of TLS certificate private key password.
- quota: Customize quota for instance registry.
- tracing: Customize tracing data reporter.
- tls: Customize loading the tls certificates in server
auth.go is the implement from auth interface
package main
import (
"fmt"
"net/http"
)
func Identify(*http.Request) error {
// do something
return nil
}
GOPATH=$(pwd) go build -o auth_plugin.so -buildmode=plugin auth.go
mkdir ${service-center}/plugins
mv auth_plugin.so ${service-center}/plugins
cd ${service-center}
./servicecenter