rpc

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RpcServ

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

func NewRpcServ

func NewRpcServ(engine ecom.Engine, log logs.Logger) *RpcServ

func (*RpcServ) CheckAlive

func (t *RpcServ) CheckAlive(gctx context.Context, req *pb.BaseReq) (*pb.BaseResp, error)

示例接口

func (*RpcServ) PreExec

func (t *RpcServ) PreExec(gctx context.Context, req *pb.PreExecReq) (*pb.PreExecResp, error)

合约预执行

func (*RpcServ) QueryBlock

func (t *RpcServ) QueryBlock(gctx context.Context, req *pb.QueryBlockReq) (*pb.QueryBlockResp, error)

查询区块信息

func (*RpcServ) QueryChainStatus

func (t *RpcServ) QueryChainStatus(gctx context.Context,
	req *pb.QueryChainStatusReq) (*pb.QueryChainStatusResp, error)

查询区块链状态

func (*RpcServ) QueryTx

func (t *RpcServ) QueryTx(gctx context.Context, req *pb.QueryTxReq) (*pb.QueryTxResp, error)

查询交易信息

func (*RpcServ) SelectUtxo

func (t *RpcServ) SelectUtxo(gctx context.Context, req *pb.SelectUtxoReq) (*pb.SelectUtxoResp, error)

选择utxo

func (*RpcServ) SubmitTx

func (t *RpcServ) SubmitTx(gctx context.Context, req *pb.SubmitTxReq) (*pb.BaseResp, error)

提交交易

func (*RpcServ) UnaryInterceptor

func (t *RpcServ) UnaryInterceptor() grpc.UnaryServerInterceptor

UnaryInterceptor provides a hook to intercept the execution of a unary RPC on the server.

type RpcServMG

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

rpc server启停控制管理

func NewRpcServMG

func NewRpcServMG(scfg *sconf.ServConf, engine engines.BCEngine) (*RpcServMG, error)

func (*RpcServMG) Exit

func (t *RpcServMG) Exit()

退出rpc服务,释放相关资源,需要幂等

func (*RpcServMG) Run

func (t *RpcServMG) Run() error

启动rpc服务

Jump to

Keyboard shortcuts

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