2019-09-23 08:41:02 +08:00
|
|
|
// Package plugin implements loading out-of-tree storage backends
|
|
|
|
// using https://golang.org/pkg/plugin/ on Linux and macOS.
|
|
|
|
//
|
|
|
|
// If the $RCLONE_PLUGIN_PATH is present, any Go plugins in that dir
|
|
|
|
// named like librcloneplugin_NAME.so will be loaded.
|
|
|
|
//
|
|
|
|
// To create a plugin, write the backend package like it was in-tree
|
|
|
|
// but set the package name to "main". Then, build the plugin with
|
|
|
|
//
|
2022-08-05 23:35:41 +08:00
|
|
|
// go build -buildmode=plugin -o librcloneplugin_NAME.so
|
2019-09-23 08:41:02 +08:00
|
|
|
//
|
|
|
|
// where NAME equals the plugin's fs.RegInfo.Name.
|
|
|
|
package plugin
|
|
|
|
|
|
|
|
// Build for plugin for unsupported platforms to stop go complaining
|
|
|
|
// about "no buildable Go source files".
|