LearningGp
LearningGp
### 背景 opensergo-control-plane作为控制面有很多场景有扩展的需求,比如某些自定义CRD的解析、转换或是应用等。而Go语言本身对扩展机制没有很好的支持,因此我对目前的一些方案设计和实践做了简单整理。 ### Go插件机制实现方案概述 #### Go plugin 包 基于Go plugin包实现扩展机制的方案,通过编译`.so`文件的方式构建插件,主程序借助plugin加载并使用插件,底层基于cgo 机制调用 unix 的标准接口实现。无额外的性能开销,但对插件存在严格的的约束检查。 实践案例:[mosn/mosn](https://github.com/mosn/mosn) #### 基于通讯的多进程方案 插件以独立进程的方式运行,主程序通过通讯的方式调用插件。目前该方案较多的实践是基于 [hashicorp/go-plugin](https://github.com/hashicorp/go-plugin) 框架包装,以RPC的方式通讯。可能存在一定通讯开销,插件的管理以及进程的管理会引入一定的复杂度。 实践案例:[hashicorp/terraform](https://github.com/hashicorp/terraform)、[grafana/grafana](https://github.com/grafana/grafana)中的backendplugin、[mosn/mosn](https://github.com/mosn/mosn)等 #### 动态解释执行方案 插件由Go、Lua、JS等语言编写,主程序解释执行。该方案有较多不同语言的支持框架,例如:[traefik/yaegi](https://github.com/traefik/yaegi)、[d5/tengo](https://github.com/d5/tengo)、[yuin/gopher-lua](https://github.com/yuin/gopher-lua)、[robertkrimen/otto](https://github.com/robertkrimen/otto)。其中[traefik/yaegi](https://github.com/traefik/yaegi)是一个Go解释器,完整支持Go规范。 实践案例:[traefik/traefik](https://github.com/traefik/traefik) #### WebAssembly方案 插件被编译为WebAssembly,借助[WasmEdge/WasmEdge](https://github.com/WasmEdge/WasmEdge)这一WebAssembly运行时,在Go主程序中运行WebAssembly。 ### 关于控制面的插件机制...
### File Name llmevalkit ### What happened? enviroment: - Python 3.10.4 - pip 22.0.4 I followed the llmevalkit README to run the demo, with all previous steps working successfully. However,...
### Describe what this PR does / why we need it Add an excludeArtifacts list to the configuration of the central-publishing-maven-plugin. ### Does this pull request fix one issue? ###...