Plugin developement
Client Plugin
type PluginContainer interface {
Add(plugin Plugin)
Remove(plugin Plugin)
All() []Plugin
DoPreCall(ctx context.Context, servicePath, serviceMethod string, args interface{}) error
}
PluginContainer represents a plugin container that defines all methods to manage plugins. And it also defines all extension points.
type PostCallPlugin
type PostCallPlugin interface {
PostCallPlugin is invoked after the client calls a server.
type PreCallPlugin
type PreCallPlugin interface {
DoPreCall(ctx context.Context, servicePath, serviceMethod string, args interface{}) error
}
PreCallPlugin is invoked before the client calls a server.