refactor: relocate files

This commit is contained in:
debugtalk
2022-03-03 15:06:16 +08:00
parent 01113581c9
commit 4d64f2d7b6
2 changed files with 14 additions and 13 deletions

14
plugin/inner/interface.go Normal file
View File

@@ -0,0 +1,14 @@
package pluginInternal
// FuncCaller is the interface that we're exposing as a plugin.
type FuncCaller interface {
GetNames() ([]string, error) // get all plugin function names list
Call(funcName string, args ...interface{}) (interface{}, error) // call plugin function
}
type IPlugin interface {
Init(path string) error // init plugin
Has(funcName string) bool // check if plugin has function
Call(funcName string, args ...interface{}) (interface{}, error) // call function
Quit() error // quit plugin
}