mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-11-16 22:57:53 +08:00
- Reuse existing content-addressed shadow binaries in `<plugin_dir>/.shadow` (with a per-directory shared cache fallback) and verify target digests before creating any temporary files. - Publish shadow binaries without unlinking active targets and coordinate plugin loading with stale shadow cleanup via OS-level file locks. - Add regression tests covering cross-restart shadow reuse, zero-write cache hits, fallback isolation, and concurrent load/prune coordination. Closes: #7323
18 lines
423 B
Go
18 lines
423 B
Go
//go:build !cgo && !windows
|
|
|
|
package pluginhost
|
|
|
|
import "fmt"
|
|
|
|
type unsupportedLoader struct{}
|
|
|
|
func (unsupportedLoader) Open(file pluginFile, host *Host) (pluginClient, error) {
|
|
return nil, fmt.Errorf("standard dynamic library plugin loading requires cgo on this platform: %s", file.Path)
|
|
}
|
|
|
|
func defaultPluginLoader() pluginLoader {
|
|
return unsupportedLoader{}
|
|
}
|
|
|
|
func cleanupStaleShadowPlugins(string, []pluginFile) {}
|