Plugin developement

    Client Plugin

    1. type PluginContainer interface {
    2. Add(plugin Plugin)
    3. Remove(plugin Plugin)
    4. All() []Plugin
    5. DoPreCall(ctx context.Context, servicePath, serviceMethod string, args interface{}) error
    6. }
    7. PluginContainer represents a plugin container that defines all methods to manage plugins. And it also defines all extension points.
    8. type PostCallPlugin
    9. type PostCallPlugin interface {
    10. PostCallPlugin is invoked after the client calls a server.
    11. type PreCallPlugin
    12. type PreCallPlugin interface {
    13. DoPreCall(ctx context.Context, servicePath, serviceMethod string, args interface{}) error
    14. }
    15. PreCallPlugin is invoked before the client calls a server.