Documentation ¶
Index ¶
- type API
- type GRPCClient
- func (m *GRPCClient) Interaction(pluginInterface string, function string, args []string) (string, error)
- func (m *GRPCClient) OnInstall(pluginInterface string) ([]byte, error)
- func (m *GRPCClient) OnLoad(pluginInterface string) ([]byte, error)
- func (m *GRPCClient) OnStart(pluginInterface string) ([]byte, error)
- func (m *GRPCClient) OnStop(pluginInterface string) ([]byte, error)
- func (m *GRPCClient) OnUninstall(pluginInterface string) ([]byte, error)
- func (m *GRPCClient) OnUnload(pluginInterface string) ([]byte, error)
- func (m *GRPCClient) UIFramework(pluginInterface string) ([]byte, error)
- type GRPCPlugin
- type GRPCServer
- func (m *GRPCServer) Interaction(ctx context.Context, req *proto.InteractionRequest) (*proto.InteractionResponse, error)
- func (m *GRPCServer) OnInstall(ctx context.Context, req *proto.EventsRequest) (*proto.EventsResponse, error)
- func (m *GRPCServer) OnLoad(ctx context.Context, req *proto.EventsRequest) (*proto.EventsResponse, error)
- func (m *GRPCServer) OnStart(ctx context.Context, req *proto.EventsRequest) (*proto.EventsResponse, error)
- func (m *GRPCServer) OnStop(ctx context.Context, req *proto.EventsRequest) (*proto.EventsResponse, error)
- func (m *GRPCServer) OnUninstall(ctx context.Context, req *proto.EventsRequest) (*proto.EventsResponse, error)
- func (m *GRPCServer) OnUnload(ctx context.Context, req *proto.EventsRequest) (*proto.EventsResponse, error)
- func (m *GRPCServer) UIFramework(ctx context.Context, req *proto.EventsRequest) (*proto.EventsResponse, error)
- type Plugin
- type PluginInterface
- type RPCClient
- func (m *RPCClient) Interaction(pluginInterface string, function string, args []string) (string, error)
- func (m *RPCClient) OnInstall(pluginInterface string) ([]byte, error)
- func (m *RPCClient) OnLoad(pluginInterface string) ([]byte, error)
- func (m *RPCClient) OnStart(pluginInterface string) ([]byte, error)
- func (m *RPCClient) OnStop(pluginInterface string) ([]byte, error)
- func (m *RPCClient) OnUninstall(pluginInterface string) ([]byte, error)
- func (m *RPCClient) OnUnload(pluginInterface string) ([]byte, error)
- func (m *RPCClient) UIFramework(pluginInterface string) ([]byte, error)
- type RPCServer
- func (m *RPCServer) Interaction(args map[string]interface{}, resp *string) error
- func (m *RPCServer) OnInstall(pluginInterface string, resp *[]byte) error
- func (m *RPCServer) OnLoad(pluginInterface string, resp *[]byte) error
- func (m *RPCServer) OnStart(pluginInterface string, resp *[]byte) error
- func (m *RPCServer) OnStop(pluginInterface string, resp *[]byte) error
- func (m *RPCServer) OnUninstall(pluginInterface string, resp *[]byte) error
- func (m *RPCServer) OnUnload(pluginInterface string, resp *[]byte) error
- func (m *RPCServer) UIFramework(pluginInterface string, resp *[]byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { OnLoad(config string) ([]byte, error) // 加载 OnUnload(config string) ([]byte, error) // 取消启用 OnInstall(config string) ([]byte, error) // 安装插件 OnUninstall(config string) ([]byte, error) // 卸载插件 OnStart(config string) ([]byte, error) // HL 启动 OnStop(config string) ([]byte, error) // HL 停止 Interaction(config string, function string, args []string) (string, error) // 前后端交互 UIFramework(config string) ([]byte, error) // UI框架 }
插件可调用接口
type GRPCClient ¶
type GRPCClient struct {
// contains filtered or unexported fields
}
GRPCClient is an implementation of KV that talks over RPC.
func (*GRPCClient) Interaction ¶
func (*GRPCClient) OnInstall ¶
func (m *GRPCClient) OnInstall(pluginInterface string) ([]byte, error)
func (*GRPCClient) OnUninstall ¶
func (m *GRPCClient) OnUninstall(pluginInterface string) ([]byte, error)
func (*GRPCClient) UIFramework ¶
func (m *GRPCClient) UIFramework(pluginInterface string) ([]byte, error)
type GRPCPlugin ¶
type GRPCPlugin struct { plugin.Plugin Impl API }
gRPC 配置
func (*GRPCPlugin) GRPCClient ¶
func (p *GRPCPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
gRPC Client 配置
func (*GRPCPlugin) GRPCServer ¶
func (p *GRPCPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
gRPC Server 配置
type GRPCServer ¶
type GRPCServer struct { // This is the real implementation Impl API }
Here is the gRPC server that GRPCClient talks to.
func (*GRPCServer) Interaction ¶
func (m *GRPCServer) Interaction(ctx context.Context, req *proto.InteractionRequest) (*proto.InteractionResponse, error)
func (*GRPCServer) OnInstall ¶
func (m *GRPCServer) OnInstall(ctx context.Context, req *proto.EventsRequest) (*proto.EventsResponse, error)
func (*GRPCServer) OnLoad ¶
func (m *GRPCServer) OnLoad(ctx context.Context, req *proto.EventsRequest) (*proto.EventsResponse, error)
func (*GRPCServer) OnStart ¶
func (m *GRPCServer) OnStart(ctx context.Context, req *proto.EventsRequest) (*proto.EventsResponse, error)
func (*GRPCServer) OnStop ¶
func (m *GRPCServer) OnStop(ctx context.Context, req *proto.EventsRequest) (*proto.EventsResponse, error)
func (*GRPCServer) OnUninstall ¶
func (m *GRPCServer) OnUninstall(ctx context.Context, req *proto.EventsRequest) (*proto.EventsResponse, error)
func (*GRPCServer) OnUnload ¶
func (m *GRPCServer) OnUnload(ctx context.Context, req *proto.EventsRequest) (*proto.EventsResponse, error)
func (*GRPCServer) UIFramework ¶
func (m *GRPCServer) UIFramework(ctx context.Context, req *proto.EventsRequest) (*proto.EventsResponse, error)
type PluginInterface ¶
type PluginInterface struct { Config string EnvironmentInfo struct { Platform string Arch string } }
传入数据
type RPCClient ¶
type RPCClient struct {
// contains filtered or unexported fields
}
RPCClient is an implementation of KV that talks over RPC.
func (*RPCClient) Interaction ¶
func (*RPCClient) OnUninstall ¶
Click to show internal directories.
Click to hide internal directories.