Documentation ¶
Index ¶
- func MakeUpBaseReq() rpctypes.UpBaseReq
- type GoInsider
- func (gi *GoInsider) AddPlugin(ref insolar.Reference, path string) error
- func (gi *GoInsider) DeactivateObject(object insolar.Reference) error
- func (gi *GoInsider) Deserialize(from []byte, into interface{}) error
- func (gi *GoInsider) MakeErrorSerializable(e error) error
- func (gi *GoInsider) ObtainCode(ctx context.Context, ref insolar.Reference) (string, error)
- func (gi *GoInsider) Plugin(ctx context.Context, ref insolar.Reference) (*plugin.Plugin, error)
- func (gi *GoInsider) RouteCall(ref insolar.Reference, immutable bool, saga bool, method string, args []byte, ...) ([]byte, error)
- func (gi *GoInsider) SaveAsChild(parentRef, classRef insolar.Reference, constructorName string, ...) ([]byte, error)
- func (gi *GoInsider) Serialize(what interface{}, to *[]byte) (err error)
- func (gi *GoInsider) Upstream() (*rpc.Client, error)
- type RPC
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeUpBaseReq ¶ added in v0.4.0
MakeUpBaseReq makes base of request from current CallContext
Types ¶
type GoInsider ¶
type GoInsider struct { UpstreamClient *rpc.Client lrCommon.Serializer lrCommon.SystemError // contains filtered or unexported fields }
GoInsider is an RPC interface to run code of plugins
func NewGoInsider ¶
NewGoInsider creates a new GoInsider instance validating arguments
func (*GoInsider) DeactivateObject ¶ added in v0.6.0
DeactivateObject ...
func (*GoInsider) Deserialize ¶ added in v0.0.4
Deserialize - CBOR de-serializer wrapper: `from` -> `into`
func (*GoInsider) MakeErrorSerializable ¶ added in v0.4.0
MakeErrorSerializable converts errors satisfying error interface to foundation.Error
func (*GoInsider) ObtainCode ¶
ObtainCode returns path on the file system to the plugin, fetches it from a provider if it's not in the storage
func (*GoInsider) Plugin ¶ added in v0.0.5
Plugin loads Go plugin by reference and returns `*plugin.Plugin` ready to lookup symbols
func (*GoInsider) RouteCall ¶ added in v0.0.4
func (gi *GoInsider) RouteCall(ref insolar.Reference, immutable bool, saga bool, method string, args []byte, proxyPrototype insolar.Reference) ([]byte, error)
RouteCall ...
func (*GoInsider) SaveAsChild ¶ added in v0.0.6
func (gi *GoInsider) SaveAsChild( parentRef, classRef insolar.Reference, constructorName string, argsSerialized []byte, ) ( []byte, error, )
SaveAsChild ...
type RPC ¶ added in v0.0.4
type RPC struct {
GI *GoInsider
}
RPC struct with methods representing RPC interface of this code runner
func (*RPC) CallConstructor ¶ added in v0.0.5
func (t *RPC) CallConstructor(args rpctypes.DownCallConstructorReq, reply *rpctypes.DownCallConstructorResp) (err error)
CallConstructor is an RPC that runs a method on an object and returns a new state of the object and result of the method
func (*RPC) CallMethod ¶ added in v0.0.5
func (t *RPC) CallMethod(args rpctypes.DownCallMethodReq, reply *rpctypes.DownCallMethodResp) (err error)
CallMethod is an RPC that runs a method on an object and returns a new state of the object and result of the method