1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-04 17:27:23 -05:00
v2fly/plugin.go

19 lines
551 B
Go
Raw Normal View History

2017-11-22 17:00:46 -05:00
package core
2017-11-22 17:15:14 -05:00
// PluginMetadata contains some brief information regarding a plugin.
2017-11-22 17:00:46 -05:00
type PluginMetadata struct {
2017-11-22 17:15:14 -05:00
// Name of the plugin
2017-11-22 17:00:46 -05:00
Name string
}
2017-11-22 17:15:14 -05:00
// GetMetadataFuncName is the name of the function in the plugin to return PluginMetadata.
2017-11-22 17:00:46 -05:00
const GetMetadataFuncName = "GetPluginMetadata"
2017-11-22 17:15:14 -05:00
// GetMetadataFunc is the type of the function in the plugin to return PluginMetadata.
2017-11-22 17:00:46 -05:00
type GetMetadataFunc func() PluginMetadata
2017-11-22 17:15:14 -05:00
// LoadPlugins loads all possible plugins in the 'plugin' directory.
func LoadPlugins() error {
return loadPluginsInternal()
}