rpc

package
v0.0.0-...-3fb78a3 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCDMClientStream

func GetCDMClientStream(conn *grpc.ClientConn) (protogo.CDMRpc_CDMCommunicateClient, error)

GetCDMClientStream get rpc stream

Types

type CDMClient

type CDMClient struct {
	// contains filtered or unexported fields
}

func NewCDMClient

func NewCDMClient(_id uint64, _logger *logger.CMLogger, _clientMgr ClientMgr) *CDMClient

func (*CDMClient) NewClientConn

func (c *CDMClient) NewClientConn() (*grpc.ClientConn, error)

NewClientConn create rpc connection

func (*CDMClient) StartClient

func (c *CDMClient) StartClient() error

func (*CDMClient) StopSendRecv

func (c *CDMClient) StopSendRecv()

type ClientManager

type ClientManager struct {
	// contains filtered or unexported fields
}

func NewClientManager

func NewClientManager(vmConfig *config.DockerVMConfig) *ClientManager

func (*ClientManager) CloseAllConnections

func (cm *ClientManager) CloseAllConnections()

func (*ClientManager) DeleteReceiveChan

func (cm *ClientManager) DeleteReceiveChan(chainId, txId string) bool

func (*ClientManager) GetAndDeleteReceiveChan

func (cm *ClientManager) GetAndDeleteReceiveChan(chainId, txId string) chan *protogo.CDMMessage

func (*ClientManager) GetReceiveChan

func (cm *ClientManager) GetReceiveChan(chainId, txId string) chan *protogo.CDMMessage

func (*ClientManager) GetSysCallRespSendCh

func (cm *ClientManager) GetSysCallRespSendCh() chan *protogo.CDMMessage

func (*ClientManager) GetTxSendCh

func (cm *ClientManager) GetTxSendCh() chan *protogo.CDMMessage

func (*ClientManager) GetUniqueTxKey

func (cm *ClientManager) GetUniqueTxKey(txId string) string

func (*ClientManager) GetVMConfig

func (cm *ClientManager) GetVMConfig() *config.DockerVMConfig

func (*ClientManager) HasActiveConnections

func (cm *ClientManager) HasActiveConnections() bool

func (*ClientManager) NeedSendContractByteCode

func (cm *ClientManager) NeedSendContractByteCode() bool

func (*ClientManager) PutEvent

func (cm *ClientManager) PutEvent(event *Event)

func (*ClientManager) PutSysCallResponse

func (cm *ClientManager) PutSysCallResponse(sysCallResp *protogo.CDMMessage)

func (*ClientManager) PutTxRequest

func (cm *ClientManager) PutTxRequest(txRequest *protogo.CDMMessage)

func (*ClientManager) RegisterReceiveChan

func (cm *ClientManager) RegisterReceiveChan(chainId, txId string, receiveCh chan *protogo.CDMMessage) error

func (*ClientManager) Start

func (cm *ClientManager) Start() error

type ClientMgr

type ClientMgr interface {
	GetTxSendCh() chan *protogo.CDMMessage

	GetSysCallRespSendCh() chan *protogo.CDMMessage

	GetAndDeleteReceiveChan(chainId, txId string) chan *protogo.CDMMessage

	GetReceiveChan(chainId, txId string) chan *protogo.CDMMessage

	GetVMConfig() *config.DockerVMConfig

	PutEvent(event *Event)
}

type Event

type Event struct {
	// contains filtered or unexported fields
}

type EventType

type EventType int

Jump to

Keyboard shortcuts

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