Documentation ¶
Index ¶
- func ConvertQueueToMessageQueue(ctx context.Context, queue []*Transcript) []*payload.ExecutionQueueElement
- func ServiceDataFromContext(ctx context.Context) *payload.ServiceData
- type CBORSerializer
- type LogicRunnerRPCStub
- type OutgoingRequest
- type ProxyHelper
- type RPC
- type Serializer
- type SystemError
- type SystemErrorImpl
- type Transcript
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertQueueToMessageQueue ¶
func ConvertQueueToMessageQueue(ctx context.Context, queue []*Transcript) []*payload.ExecutionQueueElement
func ServiceDataFromContext ¶
func ServiceDataFromContext(ctx context.Context) *payload.ServiceData
Types ¶
type CBORSerializer ¶
type CBORSerializer struct{}
func NewCBORSerializer ¶
func NewCBORSerializer() *CBORSerializer
func (*CBORSerializer) Deserialize ¶
func (s *CBORSerializer) Deserialize(from []byte, to interface{}) error
func (*CBORSerializer) Serialize ¶
func (s *CBORSerializer) Serialize(what interface{}, to *[]byte) (err error)
type LogicRunnerRPCStub ¶
type LogicRunnerRPCStub interface { GetCode(rpctypes.UpGetCodeReq, *rpctypes.UpGetCodeResp) error RouteCall(rpctypes.UpRouteReq, *rpctypes.UpRouteResp) error SaveAsChild(rpctypes.UpSaveAsChildReq, *rpctypes.UpSaveAsChildResp) error DeactivateObject(rpctypes.UpDeactivateObjectReq, *rpctypes.UpDeactivateObjectResp) error }
type OutgoingRequest ¶
type ProxyHelper ¶
type ProxyHelper interface { SystemError Serializer RouteCall( ref insolar.Reference, immutable bool, saga bool, method string, args []byte, proxyPrototype insolar.Reference, ) (result []byte, err error) SaveAsChild( parentRef, classRef insolar.Reference, constructorName string, argsSerialized []byte, ) (objRef *insolar.Reference, result []byte, err error) DeactivateObject(object insolar.Reference) error MakeErrorSerializable(error) error }
ProxyHelper interface with methods that are needed by contract proxies
var CurrentProxyCtx ProxyHelper
CurrentProxyCtx - hackish way to give proxies access to the current environment. Also, to avoid compiling in whole Insolar platform into every contract based on GoPlugin.
type RPC ¶
type RPC struct {
// contains filtered or unexported fields
}
RPC is a RPC interface for runner to use for various tasks, e.g. code fetching
func NewRPC ¶
func NewRPC(lr LogicRunnerRPCStub, cfg *configuration.LogicRunner) *RPC
type Serializer ¶
type SystemError ¶
type SystemErrorImpl ¶
type SystemErrorImpl struct{}
func NewSystemError ¶
func NewSystemError() *SystemErrorImpl
func (*SystemErrorImpl) GetSystemError ¶
func (h *SystemErrorImpl) GetSystemError() error
func (*SystemErrorImpl) SetSystemError ¶
func (h *SystemErrorImpl) SetSystemError(err error)
type Transcript ¶
type Transcript struct { ObjectDescriptor artifacts.ObjectDescriptor Context context.Context LogicContext *insolar.LogicCallContext Request *record.IncomingRequest RequestRef insolar.Reference Nonce uint64 Deactivate bool OutgoingRequests []OutgoingRequest }
func NewTranscript ¶
func NewTranscript( ctx context.Context, requestRef insolar.Reference, request record.IncomingRequest, ) *Transcript
func NewTranscriptCloneContext ¶
func NewTranscriptCloneContext( ctxSource interface{}, requestRef insolar.Reference, request record.IncomingRequest, ) *Transcript
NewTranscriptCloneContext creates a transcript with fresh context created from contextSource which can be either other Context or ServiceData. In general transcript shouldn't be created with context as execution can take minutes.
func (*Transcript) AddOutgoingRequest ¶
func (t *Transcript) AddOutgoingRequest( ctx context.Context, request record.IncomingRequest, result []byte, newObject *insolar.Reference, err error, )
func (*Transcript) HasOutgoingRequest ¶
func (t *Transcript) HasOutgoingRequest( ctx context.Context, request record.IncomingRequest, ) *OutgoingRequest
Click to show internal directories.
Click to hide internal directories.