mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-13 06:49:45 +08:00
15 lines
677 B
Go
15 lines
677 B
Go
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
|
|
}
|