Documentation ¶
Index ¶
- type GoInsider
- func (gi *GoInsider) Deserialize(from []byte, into interface{}) error
- func (gi *GoInsider) GetDelegate(object, ofType core.RecordRef) (core.RecordRef, error)
- func (gi *GoInsider) GetObjChildren(obj core.RecordRef, class core.RecordRef) ([]core.RecordRef, error)
- func (gi *GoInsider) ObtainCode(ref core.RecordRef) (string, error)
- func (gi *GoInsider) Plugin(ref core.RecordRef) (*plugin.Plugin, error)
- func (gi *GoInsider) RouteCall(ref core.RecordRef, wait bool, method string, args []byte) ([]byte, error)
- func (gi *GoInsider) RouteConstructorCall(ref core.RecordRef, name string, args []byte) ([]byte, error)
- func (gi *GoInsider) SaveAsChild(parentRef, classRef core.RecordRef, data []byte) (core.RecordRef, error)
- func (gi *GoInsider) SaveAsDelegate(intoRef, classRef core.RecordRef, data []byte) (core.RecordRef, error)
- func (gi *GoInsider) Serialize(what interface{}, to *[]byte) error
- func (gi *GoInsider) Upstream() (*rpc.Client, error)
- type RPC
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoInsider ¶
type GoInsider struct { UpstreamRPCAddress string UpstreamRPCClient *rpc.Client // 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) Deserialize ¶
Deserialize - CBOR de-serializer wrapper: `from` -> `into`
func (*GoInsider) GetDelegate ¶ added in v0.2.0
GetDelegate ...
func (*GoInsider) GetObjChildren ¶ added in v0.2.0
func (gi *GoInsider) GetObjChildren(obj core.RecordRef, class core.RecordRef) ([]core.RecordRef, error)
GetObjChildren ...
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 ¶
func (gi *GoInsider) RouteCall(ref core.RecordRef, wait bool, method string, args []byte) ([]byte, error)
RouteCall ...
func (*GoInsider) RouteConstructorCall ¶ added in v0.0.5
func (gi *GoInsider) RouteConstructorCall(ref core.RecordRef, name string, args []byte) ([]byte, error)
RouteConstructorCall ...
func (*GoInsider) SaveAsChild ¶ added in v0.0.6
func (gi *GoInsider) SaveAsChild(parentRef, classRef core.RecordRef, data []byte) (core.RecordRef, error)
SaveAsChild ...
func (*GoInsider) SaveAsDelegate ¶ added in v0.0.6
func (gi *GoInsider) SaveAsDelegate(intoRef, classRef core.RecordRef, data []byte) (core.RecordRef, error)
SaveAsDelegate ...
type RPC ¶
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) 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) 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