Documentation ¶
Index ¶
- func InitRequestManager() error
- func InitRequestManagerMock() error
- type Request
- type RequestManager
- func (r *RequestManager) CrossChainCancel(txRequest *cross_chain.CrossChainCancelRequest, timeout int64, ...) (*cross_chain.CrossChainCancelResponse, error)
- func (r *RequestManager) CrossChainConfirm(txRequest *cross_chain.CrossChainConfirmRequest, timeout int64, ...) (*cross_chain.CrossChainConfirmResponse, error)
- func (r *RequestManager) CrossChainTry(txRequest *cross_chain.CrossChainTryRequest, timeout int64, ...) (*cross_chain.CrossChainTryResponse, error)
- func (r *RequestManager) IsCrossChainSuccess(txRequest *cross_chain.IsCrossChainSuccessRequest, timeout int64, ...) (*cross_chain.IsCrossChainSuccessResponse, error)
- func (r *RequestManager) PingPong(timeout int64, destGatewayInfo *common.GatewayInfo) (*cross_chain.PingPongResponse, error)
- func (r *RequestManager) VerifyTx(txVerifyInterface *common.TxVerifyInterface, txProve string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Request ¶
type Request interface { CrossChainTry( txRequest *cross_chain.CrossChainTryRequest, timeout int64, destGatewayInfo *common.GatewayInfo) (*cross_chain.CrossChainTryResponse, error) CrossChainConfirm( txRequest *cross_chain.CrossChainConfirmRequest, timeout int64, destGatewayInfo *common.GatewayInfo) (*cross_chain.CrossChainConfirmResponse, error) CrossChainCancel( txRequest *cross_chain.CrossChainCancelRequest, timeout int64, destGatewayInfo *common.GatewayInfo) (*cross_chain.CrossChainCancelResponse, error) IsCrossChainSuccess( txRequest *cross_chain.IsCrossChainSuccessRequest, timeout int64, destGatewayInfo *common.GatewayInfo) (*cross_chain.IsCrossChainSuccessResponse, error) PingPong(timeout int64, destGatewayInfo *common.GatewayInfo) (*cross_chain.PingPongResponse, error) VerifyTx(txVerifyInterface *common.TxVerifyInterface, txProve string) ([]byte, error) }
Request 请求接口
func NewRequest ¶
func NewRequest(log *zap.SugaredLogger) Request
NewRequest mock request
@param log @return Request
type RequestManager ¶
type RequestManager struct {
// contains filtered or unexported fields
}
RequestManager 请求结构体
var RequestV1 *RequestManager
RequestV1 请求全局变量
func (*RequestManager) CrossChainCancel ¶
func (r *RequestManager) CrossChainCancel( txRequest *cross_chain.CrossChainCancelRequest, timeout int64, destGatewayInfo *common.GatewayInfo) (*cross_chain.CrossChainCancelResponse, error)
CrossChainCancel 跨链回滚
@receiver r @param txRequest @param timeout @param destGatewayInfo @return *cross_chain.CrossChainCancelResponse @return error
func (*RequestManager) CrossChainConfirm ¶
func (r *RequestManager) CrossChainConfirm( txRequest *cross_chain.CrossChainConfirmRequest, timeout int64, destGatewayInfo *common.GatewayInfo) (*cross_chain.CrossChainConfirmResponse, error)
CrossChainConfirm 跨链提交
@receiver r @param txRequest @param timeout @param destGatewayInfo @return *cross_chain.CrossChainConfirmResponse @return error
func (*RequestManager) CrossChainTry ¶
func (r *RequestManager) CrossChainTry( txRequest *cross_chain.CrossChainTryRequest, timeout int64, destGatewayInfo *common.GatewayInfo) (*cross_chain.CrossChainTryResponse, error)
CrossChainTry 跨链执行
@receiver r @param txRequest @param timeout @param destGatewayInfo @return *cross_chain.CrossChainTryResponse @return error
func (*RequestManager) IsCrossChainSuccess ¶
func (r *RequestManager) IsCrossChainSuccess( txRequest *cross_chain.IsCrossChainSuccessRequest, timeout int64, destGatewayInfo *common.GatewayInfo) (*cross_chain.IsCrossChainSuccessResponse, error)
IsCrossChainSuccess 询问跨链是否成功
@receiver r @param txRequest @param timeout @param destGatewayInfo @return *cross_chain.IsCrossChainSuccessResponse @return error
func (*RequestManager) PingPong ¶
func (r *RequestManager) PingPong(timeout int64, destGatewayInfo *common.GatewayInfo) (*cross_chain.PingPongResponse, error)
PingPong 心跳
@receiver r @param timeout @param destGatewayInfo @return *cross_chain.PingPongResponse @return error
func (*RequestManager) VerifyTx ¶
func (r *RequestManager) VerifyTx(txVerifyInterface *common.TxVerifyInterface, txProve string) ([]byte, error)
VerifyTx 交易验证
@receiver r @param txVerifyInterface @param txProve @return []byte @return error
Click to show internal directories.
Click to hide internal directories.