Documentation ¶
Overview ¶
Package goplugin - golang plugin in docker runner
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoPlugin ¶
type GoPlugin struct { Options Options RunnerOptions RunnerOptions // contains filtered or unexported fields }
GoPlugin is a logic runner of code written in golang and compiled as go plugins
func NewGoPlugin ¶
func NewGoPlugin(options Options, runnerOptions RunnerOptions) (*GoPlugin, error)
NewGoPlugin returns a new started GoPlugin
func (*GoPlugin) Exec ¶
func (gp *GoPlugin) Exec(object logicrunner.Object, method string, args logicrunner.Arguments) ([]byte, logicrunner.Arguments, error)
Exec runs a method on an object in controlled environment
type Options ¶
type Options struct { // Listen is address `GoPlugin` listens on and provides RPC interface for runner(s) Listen string // CodePath is path to directory with plugin's code, this should go away at some point CodePath string }
Options of the GoPlugin
type RPC ¶
type RPC struct {
// contains filtered or unexported fields
}
RPC is a RPC interface for runner to use for variouse tasks, e.g. code fetching
func (*RPC) GetObject ¶
func (gpr *RPC) GetObject(ref logicrunner.Reference, reply *logicrunner.Object) error
GetObject is an RPC retriving an object by its reference, so far short circueted to return code of the plugin
type RunnerOptions ¶
type RunnerOptions struct { // Listen is address the runner listens on and provides RPC interface for the `GoPlugin` Listen string // CodeStoragePath is path to directory where the runner caches code CodeStoragePath string }
RunnerOptions - set of options to control internal isolated code runner(s)
Directories ¶
Path | Synopsis |
---|---|
testplugins
|
|
foundation
Package foundation emulates foundation of types for golang contracts
|
Package foundation emulates foundation of types for golang contracts |
Click to show internal directories.
Click to hide internal directories.