Documentation ¶
Overview ¶
Package goplugin - golang plugin in docker runner
Index ¶
- type CallConstructorResult
- type CallMethodResult
- type GoPlugin
- func (gp *GoPlugin) CallConstructor(ctx context.Context, callContext *insolar.LogicCallContext, ...) ([]byte, insolar.Arguments, error)
- func (gp *GoPlugin) CallConstructorRPC(ctx context.Context, req rpctypes.DownCallConstructorReq, ...)
- func (gp *GoPlugin) CallMethod(ctx context.Context, callContext *insolar.LogicCallContext, ...) ([]byte, insolar.Arguments, error)
- func (gp *GoPlugin) CallMethodRPC(ctx context.Context, req rpctypes.DownCallMethodReq, ...)
- func (gp *GoPlugin) CloseDownstream()
- func (gp *GoPlugin) Downstream(ctx context.Context) (*rpc.Client, error)
- type Options
- type RunnerOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallConstructorResult ¶ added in v0.6.3
type CallConstructorResult struct { Response rpctypes.DownCallConstructorResp Error error }
type CallMethodResult ¶ added in v0.6.3
type CallMethodResult struct { Response rpctypes.DownCallMethodResp Error error }
type GoPlugin ¶
type GoPlugin struct { Cfg *configuration.LogicRunner ArtifactManager artifacts.Client // contains filtered or unexported fields }
GoPlugin is a logic runner of code written in golang and compiled as go plugins
func NewGoPlugin ¶
func NewGoPlugin(conf *configuration.LogicRunner, am artifacts.Client) (*GoPlugin, error)
NewGoPlugin returns a new started GoPlugin
func (*GoPlugin) CallConstructor ¶ added in v0.0.5
func (gp *GoPlugin) CallConstructor( ctx context.Context, callContext *insolar.LogicCallContext, code insolar.Reference, name string, args insolar.Arguments, ) ( []byte, insolar.Arguments, error, )
CallConstructor runs a constructor of a contract in controlled environment
func (*GoPlugin) CallConstructorRPC ¶ added in v0.6.3
func (gp *GoPlugin) CallConstructorRPC(ctx context.Context, req rpctypes.DownCallConstructorReq, res rpctypes.DownCallConstructorResp, resultChan chan CallConstructorResult)
func (*GoPlugin) CallMethod ¶ added in v0.0.5
func (gp *GoPlugin) CallMethod( ctx context.Context, callContext *insolar.LogicCallContext, code insolar.Reference, data []byte, method string, args insolar.Arguments, ) ( []byte, insolar.Arguments, error, )
CallMethod runs a method on an object in controlled environment
func (*GoPlugin) CallMethodRPC ¶ added in v0.6.3
func (gp *GoPlugin) CallMethodRPC(ctx context.Context, req rpctypes.DownCallMethodReq, res rpctypes.DownCallMethodResp, resultChan chan CallMethodResult)
func (*GoPlugin) CloseDownstream ¶ added in v0.6.3
func (gp *GoPlugin) CloseDownstream()
type Options ¶
type Options struct { // Listen is address `GoPlugin` listens on and provides RPC interface for runner(s) Listen string }
Options of the GoPlugin
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)
Click to show internal directories.
Click to hide internal directories.