rpc

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GRPCMaxRecvMsgSize = 4096 * 1024
	GRPCServerType     = "tcp"
)
View Source
const (
	// DefaultHTTPLimit default max http conns
	DefaultProxyHTTPLimit = 2000
)

Variables

View Source
var (
	ErrPanicResp = errors.New("rpc panic")
)

Functions

func Dial

func Dial(target string) (*grpc.ClientConn, error)

func RunWebProxy added in v1.0.2

func RunWebProxy(grpcServer *grpc.Server, config *service_configs.GRPCConfig) error

Types

type APIService

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

func NewAPIService added in v1.0.2

func (*APIService) BroadcastTrx

func (as *APIService) BroadcastTrx(ctx context.Context, req *grpcpb.BroadcastTrxRequest) (*grpcpb.BroadcastTrxResponse, error)

func (*APIService) EstimateStamina added in v1.0.2

func (as *APIService) EstimateStamina(ctx context.Context, req *grpcpb.EsimateRequest) (*grpcpb.EsimateResponse, error)

func (*APIService) GetAccountByName

func (as *APIService) GetAccountByName(ctx context.Context, req *grpcpb.GetAccountByNameRequest) (*grpcpb.AccountResponse, error)

func (*APIService) GetAccountByPubKey added in v1.0.2

func (as *APIService) GetAccountByPubKey(ctx context.Context, req *grpcpb.GetAccountByPubKeyRequest) (*grpcpb.AccountResponse, error)

func (*APIService) GetAccountListByBalance added in v1.0.2

func (as *APIService) GetAccountListByBalance(ctx context.Context, req *grpcpb.GetAccountListByBalanceRequest) (*grpcpb.GetAccountListResponse, error)

func (*APIService) GetAccountListByCreTime added in v1.0.2

func (as *APIService) GetAccountListByCreTime(ctx context.Context, req *grpcpb.GetAccountListByCreTimeRequest) (*grpcpb.GetAccountListResponse, error)

func (*APIService) GetAccountListByVest added in v1.0.2

func (as *APIService) GetAccountListByVest(ctx context.Context, req *grpcpb.GetAccountListByVestRequest) (*grpcpb.GetAccountListResponse, error)

func (*APIService) GetAppTableRecord added in v1.0.2

func (as *APIService) GetAppTableRecord(ctx context.Context, req *grpcpb.GetAppTableRecordRequest) (*grpcpb.GetAppTableRecordResponse, error)

func (*APIService) GetBlkIsIrreversibleByTxId added in v1.0.2

func (as *APIService) GetBlkIsIrreversibleByTxId(ctx context.Context,
	req *grpcpb.GetBlkIsIrreversibleByTxIdRequest) (*grpcpb.GetBlkIsIrreversibleByTxIdResponse, error)

func (*APIService) GetBlockBFTInfoByNum added in v1.0.2

func (as *APIService) GetBlockBFTInfoByNum(ctx context.Context, req *grpcpb.GetBlockBFTInfoByNumRequest) (*grpcpb.GetBlockBFTInfoByNumResponse, error)

func (*APIService) GetBlockList added in v1.0.2

func (as *APIService) GetBlockList(ctx context.Context, req *grpcpb.GetBlockListRequest) (*grpcpb.GetBlockListResponse, error)

func (*APIService) GetBlockProducerByName added in v1.0.2

func (as *APIService) GetBlockProducerByName(ctx context.Context, req *grpcpb.GetBlockProducerByNameRequest) (*grpcpb.BlockProducerResponse, error)

func (*APIService) GetBlockProducerList added in v1.0.2

func (as *APIService) GetBlockProducerList(ctx context.Context, req *grpcpb.GetBlockProducerListRequest) (*grpcpb.GetBlockProducerListResponse, error)

func (*APIService) GetBlockProducerListByVoteCount added in v1.0.2

func (as *APIService) GetBlockProducerListByVoteCount(ctx context.Context, req *grpcpb.GetBlockProducerListByVoteCountRequest) (*grpcpb.GetBlockProducerListResponse, error)

func (*APIService) GetBlockProducerVoterList added in v1.0.3

func (as *APIService) GetBlockProducerVoterList(ctx context.Context, req *grpcpb.GetBlockProducerVoterListRequest) (*grpcpb.GetBlockProducerVoterListResponse, error)

func (*APIService) GetBlockTransactionsByNum

func (as *APIService) GetBlockTransactionsByNum(ctx context.Context, req *grpcpb.GetBlockTransactionsByNumRequest) (*grpcpb.GetBlockTransactionsByNumResponse, error)

func (*APIService) GetChainState

func (as *APIService) GetChainState(ctx context.Context, req *grpcpb.NonParamsRequest) (*grpcpb.GetChainStateResponse, error)

func (*APIService) GetContractInfo added in v1.0.2

func (as *APIService) GetContractInfo(ctx context.Context, req *grpcpb.GetContractInfoRequest) (*grpcpb.GetContractInfoResponse, error)

func (*APIService) GetContractListByTime added in v1.0.2

func (as *APIService) GetContractListByTime(ctx context.Context, req *grpcpb.GetContractListByTimeRequest) (*grpcpb.GetContractListResponse, error)

func (*APIService) GetDailyStats added in v1.0.2

func (as *APIService) GetDailyStats(ctx context.Context, req *grpcpb.GetDailyStatsRequest) (*grpcpb.GetDailyStatsResponse, error)

func (*APIService) GetDailyTotalTrxInfo added in v1.0.2

func (as *APIService) GetDailyTotalTrxInfo(ctx context.Context, req *grpcpb.GetDailyTotalTrxRequest) (*grpcpb.GetDailyTotalTrxResponse, error)

func (*APIService) GetFollowCountByName

func (as *APIService) GetFollowCountByName(ctx context.Context, req *grpcpb.GetFollowCountByNameRequest) (*grpcpb.GetFollowCountByNameResponse, error)

func (*APIService) GetFollowerListByName

func (as *APIService) GetFollowerListByName(ctx context.Context, req *grpcpb.GetFollowerListByNameRequest) (*grpcpb.GetFollowerListByNameResponse, error)

func (*APIService) GetFollowingListByName

func (as *APIService) GetFollowingListByName(ctx context.Context, req *grpcpb.GetFollowingListByNameRequest) (*grpcpb.GetFollowingListByNameResponse, error)

func (*APIService) GetMyStakers added in v1.0.2

func (as *APIService) GetMyStakers(ctx context.Context, req *grpcpb.GetMyStakerListByNameRequest) (*grpcpb.GetMyStakerListByNameResponse, error)

func (*APIService) GetMyStakes added in v1.0.2

func (as *APIService) GetMyStakes(ctx context.Context, req *grpcpb.GetMyStakeListByNameRequest) (*grpcpb.GetMyStakeListByNameResponse, error)

func (*APIService) GetNodeNeighbours added in v1.0.2

func (as *APIService) GetNodeNeighbours(ctx context.Context, req *grpcpb.NonParamsRequest) (*grpcpb.GetNodeNeighboursResponse, error)

func (*APIService) GetNodeRunningVersion added in v1.0.2

func (as *APIService) GetNodeRunningVersion(ctx context.Context, req *grpcpb.NonParamsRequest) (*grpcpb.GetNodeRunningVersionResponse, error)

func (*APIService) GetPostInfoById added in v1.0.2

func (as *APIService) GetPostInfoById(ctx context.Context, req *grpcpb.GetPostInfoByIdRequest) (*grpcpb.GetPostInfoByIdResponse, error)

func (*APIService) GetPostListByCreateTime added in v1.0.2

func (as *APIService) GetPostListByCreateTime(ctx context.Context, req *grpcpb.GetPostListByCreateTimeRequest) (*grpcpb.GetPostListByCreateTimeResponse, error)

func (*APIService) GetPostListByCreated

func (as *APIService) GetPostListByCreated(ctx context.Context, req *grpcpb.GetPostListByCreatedRequest) (*grpcpb.GetPostListByCreatedResponse, error)

func (*APIService) GetPostListByName added in v1.0.2

func (as *APIService) GetPostListByName(ctx context.Context, req *grpcpb.GetPostListByNameRequest) (*grpcpb.GetPostListByCreateTimeResponse, error)

func (*APIService) GetPostListByVest added in v1.0.2

func (as *APIService) GetPostListByVest(ctx context.Context,
	req *grpcpb.GetPostListByVestRequest) (*grpcpb.GetPostListByVestResponse, error)

func (*APIService) GetReplyListByPostId

func (as *APIService) GetReplyListByPostId(ctx context.Context, req *grpcpb.GetReplyListByPostIdRequest) (*grpcpb.GetReplyListByPostIdResponse, error)

func (*APIService) GetSignedBlock added in v1.0.2

func (as *APIService) GetSignedBlock(ctx context.Context, req *grpcpb.GetSignedBlockRequest) (*grpcpb.GetSignedBlockResponse, error)

func (*APIService) GetTrxInfoById added in v1.0.2

func (as *APIService) GetTrxInfoById(ctx context.Context, req *grpcpb.GetTrxInfoByIdRequest) (*grpcpb.GetTrxInfoByIdResponse, error)

func (*APIService) GetTrxListByTime added in v1.0.2

func (as *APIService) GetTrxListByTime(ctx context.Context, req *grpcpb.GetTrxListByTimeRequest) (*grpcpb.GetTrxListByTimeResponse, error)

func (*APIService) GetUserTrxListByTime added in v1.0.2

func (as *APIService) GetUserTrxListByTime(ctx context.Context, req *grpcpb.GetUserTrxListByTimeRequest) (*grpcpb.GetUserTrxListByTimeResponse, error)

func (*APIService) GetVestDelegationOrderList added in v1.0.8

func (as *APIService) GetVestDelegationOrderList(ctx context.Context, req *grpcpb.GetVestDelegationOrderListRequest) (resp *grpcpb.GetVestDelegationOrderListResponse, err error)

func (*APIService) QueryTableContent added in v1.0.2

func (as *APIService) QueryTableContent(ctx context.Context, req *grpcpb.GetTableContentRequest) (*grpcpb.TableContentResponse, error)

func (*APIService) TrxStatByHour added in v1.0.2

func (as *APIService) TrxStatByHour(ctx context.Context, req *grpcpb.TrxStatByHourRequest) (*grpcpb.TrxStatByHourResponse, error)

type GRPCIntercepter added in v1.0.2

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

func NewGRPCIntercepter added in v1.0.2

func NewGRPCIntercepter(log *logrus.Logger) *GRPCIntercepter

type GRPCServer

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

func NewGRPCServer

func NewGRPCServer(ctx *node.ServiceContext, config service_configs.GRPCConfig, lg *logrus.Logger) (*GRPCServer, error)

func (*GRPCServer) Start

func (gs *GRPCServer) Start(node *node.Node) error

func (*GRPCServer) Stop

func (gs *GRPCServer) Stop() error

Directories

Path Synopsis
Package mock_grpcpb is a generated GoMock package.
Package mock_grpcpb is a generated GoMock package.

Jump to

Keyboard shortcuts

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