Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientManager ¶
type ClientManager interface { PutTxRequest(txRequest *protogo.CDMMessage) PutSysCallResponse(sysCallResp *protogo.CDMMessage) RegisterReceiveChan(chainId, txId string, receiveCh chan *protogo.CDMMessage) error DeleteReceiveChan(chainId, txId string) bool GetVMConfig() *config.DockerVMConfig GetUniqueTxKey(txId string) string NeedSendContractByteCode() bool HasActiveConnections() bool }
type DockerManager ¶
type DockerManager struct {
// contains filtered or unexported fields
}
func NewDockerManager ¶
func NewDockerManager(chainId string, vmConfig map[string]interface{}) *DockerManager
NewDockerManager return docker manager and running a default container
func (*DockerManager) NewRuntimeInstance ¶
func (m *DockerManager) NewRuntimeInstance(txSimContext protocol.TxSimContext, chainId, method, codePath string, contract *common.Contract, byteCode []byte, logger protocol.Logger) (protocol.RuntimeInstance, error)
func (*DockerManager) StopVM ¶
func (m *DockerManager) StopVM() error
StopVM stop docker vm and remove container, image
type RuntimeInstance ¶
type RuntimeInstance struct { ChainId string // chain id ClientManager ClientManager Log protocol.Logger // contains filtered or unexported fields }
RuntimeInstance docker-go runtime
func (*RuntimeInstance) Invoke ¶
func (r *RuntimeInstance) Invoke(contract *commonPb.Contract, method string, byteCode []byte, parameters map[string][]byte, txSimContext protocol.TxSimContext, gasUsed uint64) (contractResult *commonPb.ContractResult, execOrderTxType protocol.ExecOrderTxType)
Invoke process one tx in docker and return result nolint: gocyclo, revive
Click to show internal directories.
Click to hide internal directories.