Documentation ¶
Index ¶
- type AndesDriver
- func (driver *AndesDriver) Close() error
- func (driver *AndesDriver) DiagnoseWait(milliseconds uint32) error
- func (driver *AndesDriver) GasScheduleChange(newGasSchedule map[string]map[string]uint64)
- func (driver *AndesDriver) GetVersion() string
- func (driver *AndesDriver) IsClosed() bool
- func (driver *AndesDriver) IsInterfaceNil() bool
- func (driver *AndesDriver) RestartAndesIfNecessary() error
- func (driver *AndesDriver) RunSmartContractCall(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
- func (driver *AndesDriver) RunSmartContractCreate(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error)
- type Config
- type NodeMessenger
- func (messenger *NodeMessenger) ReceiveHookCallRequestOrContractResponse(timeout int) (common.MessageHandler, int, error)
- func (messenger *NodeMessenger) SendContractRequest(request common.MessageHandler) error
- func (messenger *NodeMessenger) SendHookCallResponse(response common.MessageHandler) error
- type NodePart
- type ParentLogsPart
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AndesDriver ¶
type AndesDriver struct {
// contains filtered or unexported fields
}
AndesDriver manages the execution of the Andes process
func NewAndesDriver ¶
func NewAndesDriver( blockchainHook vmcommon.BlockchainHook, andesArguments common.AndesArguments, config Config, ) (*AndesDriver, error)
NewAndesDriver creates a new driver
func (*AndesDriver) DiagnoseWait ¶
func (driver *AndesDriver) DiagnoseWait(milliseconds uint32) error
DiagnoseWait sends a diagnose message to Andes
func (*AndesDriver) GasScheduleChange ¶
func (driver *AndesDriver) GasScheduleChange(newGasSchedule map[string]map[string]uint64)
GasScheduleChange sends a "gas change" request to Andes and waits for the output
func (*AndesDriver) GetVersion ¶
func (driver *AndesDriver) GetVersion() string
GetVersion gets the Andes version
func (*AndesDriver) IsClosed ¶
func (driver *AndesDriver) IsClosed() bool
IsClosed checks whether the Andes process is closed
func (*AndesDriver) IsInterfaceNil ¶
func (driver *AndesDriver) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*AndesDriver) RestartAndesIfNecessary ¶
func (driver *AndesDriver) RestartAndesIfNecessary() error
RestartAndesIfNecessary restarts Andes if the process is closed
func (*AndesDriver) RunSmartContractCall ¶
func (driver *AndesDriver) RunSmartContractCall(input *vmcommon.ContractCallInput) (*vmcommon.VMOutput, error)
RunSmartContractCall sends an execution request to Andes and waits for the output
func (*AndesDriver) RunSmartContractCreate ¶
func (driver *AndesDriver) RunSmartContractCreate(input *vmcommon.ContractCreateInput) (*vmcommon.VMOutput, error)
RunSmartContractCreate sends a deploy request to Andes and waits for the output
type Config ¶
type Config struct {
MaxLoopTime int
}
Config is the configuration for the driver and for Node's part
type NodeMessenger ¶
NodeMessenger is the messenger on Node's part of the pipe
func NewNodeMessenger ¶
func NewNodeMessenger(reader *os.File, writer *os.File, marshalizer marshaling.Marshalizer) *NodeMessenger
NewNodeMessenger creates a new messenger
func (*NodeMessenger) ReceiveHookCallRequestOrContractResponse ¶
func (messenger *NodeMessenger) ReceiveHookCallRequestOrContractResponse(timeout int) (common.MessageHandler, int, error)
ReceiveHookCallRequestOrContractResponse waits for any message that could arrive from Andes
func (*NodeMessenger) SendContractRequest ¶
func (messenger *NodeMessenger) SendContractRequest(request common.MessageHandler) error
SendContractRequest sends a request to Andes
func (*NodeMessenger) SendHookCallResponse ¶
func (messenger *NodeMessenger) SendHookCallResponse(response common.MessageHandler) error
SendHookCallResponse sends a hook response to Andes
type NodePart ¶
type NodePart struct { Messenger *NodeMessenger Repliers []common.MessageReplier // contains filtered or unexported fields }
NodePart is the endpoint that implements the message loop on Node's side
func NewNodePart ¶
func NewNodePart( input *os.File, output *os.File, blockchain vmcommon.BlockchainHook, config Config, marshalizer marshaling.Marshalizer, ) (*NodePart, error)
NewNodePart creates the Node part
func (*NodePart) SendStopSignal ¶
SendStopSignal sends a stop signal to Andes Should only be used for tests!
func (*NodePart) StartLoop ¶
func (part *NodePart) StartLoop(request common.MessageHandler) (common.MessageHandler, error)
StartLoop runs the main loop