ginsider

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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

func NewGoInsider(path string, address string) *GoInsider

NewGoInsider creates a new GoInsider instance validating arguments

func (*GoInsider) Deserialize added in v0.0.4

func (t *GoInsider) Deserialize(from []byte, into interface{}) error

Deserialize - CBOR de-serializer wrapper: `from` -> `into`

func (*GoInsider) ObtainCode

func (t *GoInsider) ObtainCode(ref logicrunner.Reference) (string, error)

ObtainCode returns path on the file system to the plugin, fetches it from a provider if it's not in the storage

func (*GoInsider) RouteCall added in v0.0.4

func (t *GoInsider) RouteCall(ref string, method string, args []byte) ([]byte, error)

RouteCall ...

func (*GoInsider) Serialize added in v0.0.4

func (t *GoInsider) Serialize(what interface{}, to *[]byte) error

Serialize - CBOR serializer wrapper: `what` -> `to`

func (*GoInsider) Upstream added in v0.0.4

func (t *GoInsider) Upstream() (*rpc.Client, error)

Upstream returns RPC client connected to upstream server (goplugin)

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) Call added in v0.0.4

func (t *RPC) Call(args rpctypes.DownCallReq, reply *rpctypes.DownCallResp) error

Call is an RPC that runs a method on an object and returns a new state of the object and result of the method

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL