← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 4545.d.1.i

插件宿主分管进程与协议

理解等级:中级

宿主先按配置启动并管理子进程,再取得协议客户端,从约定名称Dispense出接口代理;代理方法实际经RPC执行插件逻辑。插件侧Serve提供实现映射,宿主负责结束子进程。接口看似本地,并没有消除进程退出、连接失败和错误传播,因此不得把panic样例当作可靠恢复策略。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Loose Coupling · 查看原书依据

      one client — a *plugin.Client — that manages the lifecycle of the plugin subprocess, and a protocol client — a plugin.ClientProtocol implementation — that can communicate with the plugin subprocess. This awkward API is mostly historical, but is used to split the client that deals with subprocess management and the client that does RPC management.

    参考来源

    - 位置:《Cloud Native Go》第08章《Loose Coupling》(来源项目book-sources;源文件:extracted/Cloud Native Go (Matthew A. Titmus)/_epub-src/OEBPS/ch08.xhtml) - 结论依据:宿主先按配置启动并管理子进程,再取得协议客户端,从约定名称Dispense出接口代理;代理方法实际经RPC执行插件逻辑。原文相应定义、示例或限制为此结论提供依据;补充纠错与版本边界在正文就近标明。 - 原始内容:one client — a *plugin.Client — that manages the lifecycle of the plugin subprocess, and a protocol client — a plugin.ClientProtocol implementation — that can communicate with the plugin subprocess. This awkward API is mostly historical, but is used to split the client that deals with subprocess management and the client that does RPC management.