go-plugin

command module
v0.0.0-...-9a36f85 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

README

go-plugin

go-plugins example excise

###1.返回结构体 ###接口定义 #####①.定义接口 #####②.定义RPC的结构体并实现①的接口,里面包含rpc的客户端 #####③.定义一个RPCServer结构体, 包含①的接口,实现一个①接口的方法,但是参数不同 #####④. 定义一个插件结构体, 并实现插件的接口的server和client方法, server方法返回③的结构体指针, client方法返回②的结构体指针 ###插件实现

#####⑤.定义实现接口①的结构体,并实现接口,里面包含实现的逻辑 #####⑥.定义通讯握手变量 #####⑦.定义插件集合 #####⑧.main方法开启plugin.Server

###宿主机调用 #####⑨.定义⑥和⑦ 相同的握手规则和插件集合 #####⑩.创建客户端 #####11.获取一个协议客户端 #####12.根据协议客户端获得一个接口的实例 #####13.断言为所要使用的接口类型 #####14.开始调用

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL