Documentation ¶
Overview ¶
Package logicrunner - infrastructure for executing smartcontracts
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Arguments ¶
type Arguments []byte
Arguments is a dedicated type for arguments, that represented as bynary cbored blob
type ArtifactManager ¶ added in v0.0.3
ArtifactManager interface
type Executor ¶ added in v0.0.3
type Executor interface {
Exec(codeRef Reference, data []byte, method string, args Arguments) (newObjectState []byte, methodResults Arguments, err error)
}
Executor is an interface for implementers of one particular machine type
type LogicRunner ¶
type LogicRunner struct { Executors [MachineTypesTotalCount]Executor ArtifactManager ArtifactManager }
LogicRunner is a general interface of contract executor
func NewLogicRunner ¶ added in v0.0.3
func NewLogicRunner(am ArtifactManager) (*LogicRunner, error)
NewLogicRunner is constructor for `LogicRunner`
func (*LogicRunner) Execute ¶ added in v0.0.3
Execute runs a method on an object, ATM just thin proxy to `GoPlugin.Exec`
func (*LogicRunner) GetExecutor ¶ added in v0.0.3
func (r *LogicRunner) GetExecutor(t MachineType) (Executor, error)
GetExecutor returns an executor for the `MachineType` if it was registered (`RegisterExecutor`), returns error otherwise
func (*LogicRunner) RegisterExecutor ¶ added in v0.0.3
func (r *LogicRunner) RegisterExecutor(t MachineType, e Executor) error
RegisterExecutor registers an executor for particular `MachineType`
type MachineType ¶
type MachineType int
MachineType is a type of virtual machine
const ( MachineTypeBuiltin MachineType = iota MachineTypeGoPlugin MachineTypesTotalCount )
Real constants of MachineType
type Object ¶
type Object struct { MachineType MachineType Reference Reference Data []byte }
Object is an inner representation of storage object for transfwering it over API
Directories ¶
Path | Synopsis |
---|---|
Package goplugin - golang plugin in docker runner
|
Package goplugin - golang plugin in docker runner |
testplugins/foundation
Package foundation emulates foundation of types for golang contracts
|
Package foundation emulates foundation of types for golang contracts |