proxyctx

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChildrenTypedIterator added in v0.7.5

type ChildrenTypedIterator struct {
	Parent         core.RecordRef
	ChildPrototype core.RecordRef // only child of specified prototype, if childPrototype.IsEmpty - ignored

	IteratorID string           // map key to iterators slice in logicrunner service
	Buff       []core.RecordRef // bucket of objects from previous RPC call to service

	CanFetch bool // if true, we can call RPC again and get new objects
	// contains filtered or unexported fields
}

ChildrenTypedIterator iterator over children of object with specified type it uses cache on insolard service side, provided by IteratorID

func (*ChildrenTypedIterator) HasNext added in v0.7.5

func (oi *ChildrenTypedIterator) HasNext() bool

HasNext return true if iterator has element in cache or can fetch data again

func (*ChildrenTypedIterator) Next added in v0.7.5

func (oi *ChildrenTypedIterator) Next() (core.RecordRef, error)

Next return next element from iterator cache or fetching new from service return error only if fetch() fails

type ProxyHelper

type ProxyHelper interface {
	RouteCall(ref core.RecordRef, wait bool, method string, args []byte, proxyPrototype core.RecordRef) ([]byte, error)
	SaveAsChild(parentRef, classRef core.RecordRef, constructorName string, argsSerialized []byte) (core.RecordRef, error)
	GetObjChildrenIterator(head core.RecordRef, prototype core.RecordRef, iteratorID string) (*ChildrenTypedIterator, error)
	SaveAsDelegate(parentRef, classRef core.RecordRef, constructorName string, argsSerialized []byte) (core.RecordRef, error)
	GetDelegate(object, ofType core.RecordRef) (core.RecordRef, error)
	DeactivateObject(object core.RecordRef) error
	Serialize(what interface{}, to *[]byte) error
	Deserialize(from []byte, into interface{}) error
	MakeErrorSerializable(error) error
}

ProxyHelper interface with methods that are needed by contract proxies

var Current ProxyHelper

Current - hackish way to give proxies access to the current environment

Jump to

Keyboard shortcuts

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