grpcrequest

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GrpcRequest

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

GrpcRequest grpc请求结构体

func NewGrpcRequest

func NewGrpcRequest(log *zap.SugaredLogger) *GrpcRequest

NewGrpcRequest 初始化grpc请求

@param log
@return *GrpcRequest

func (*GrpcRequest) CrossChainCancel

func (g *GrpcRequest) CrossChainCancel(
	txRequest *cross_chain.CrossChainCancelRequest,
	timeout int64,
	destGatewayInfo *common.GatewayInfo) (*cross_chain.CrossChainCancelResponse, error)

CrossChainCancel 跨链回滚

@receiver g
@param txRequest
@param timeout
@param destGatewayInfo
@return *cross_chain.CrossChainCancelResponse
@return error

func (*GrpcRequest) CrossChainConfirm

func (g *GrpcRequest) CrossChainConfirm(
	txRequest *cross_chain.CrossChainConfirmRequest,
	timeout int64, destGatewayInfo *common.GatewayInfo) (*cross_chain.CrossChainConfirmResponse, error)

CrossChainConfirm 跨链提交

@receiver g
@param txRequest
@param timeout
@param destGatewayInfo
@return *cross_chain.CrossChainConfirmResponse
@return error

func (*GrpcRequest) CrossChainTry

func (g *GrpcRequest) CrossChainTry(
	txRequest *cross_chain.CrossChainTryRequest,
	timeout int64,
	destGatewayInfo *common.GatewayInfo) (*cross_chain.CrossChainTryResponse, error)

CrossChainTry 跨链执行

@receiver g
@param txRequest
@param timeout
@param destGatewayInfo
@return *cross_chain.CrossChainTryResponse
@return error

func (*GrpcRequest) IsCrossChainSuccess

func (g *GrpcRequest) IsCrossChainSuccess(
	txRequest *cross_chain.IsCrossChainSuccessRequest,
	timeout int64,
	destGatewayInfo *common.GatewayInfo) (*cross_chain.IsCrossChainSuccessResponse, error)

IsCrossChainSuccess 询问跨链是否成功

@receiver g
@param txRequest
@param timeout
@param destGatewayInfo
@return *cross_chain.IsCrossChainSuccessResponse
@return error

func (*GrpcRequest) PingPong

func (g *GrpcRequest) PingPong(timeout int64,
	destGatewayInfo *common.GatewayInfo) (*cross_chain.PingPongResponse, error)

PingPong 心跳

@receiver g
@param timeout
@param destGatewayInfo
@return *cross_chain.PingPongResponse
@return error

func (*GrpcRequest) VerifyTx

func (g *GrpcRequest) VerifyTx(txVerifyInterface *common.TxVerifyInterface, txProve string) ([]byte, error)

VerifyTx 交易验证

@receiver g
@param txVerifyInterface
@param txProve
@return []byte
@return error

Jump to

Keyboard shortcuts

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