Documentation
¶
Index ¶
- Constants
- Variables
- func Dial(target string) (*grpc.ClientConn, error)
- func Run(config *service_configs.GRPCConfig) error
- type APIService
- func (as *APIService) BroadcastTrx(ctx context.Context, req *grpcpb.BroadcastTrxRequest) (*grpcpb.BroadcastTrxResponse, error)
- func (as *APIService) GetAccountByName(ctx context.Context, req *grpcpb.GetAccountByNameRequest) (*grpcpb.AccountResponse, error)
- func (as *APIService) GetAccountRewardByName(ctx context.Context, req *grpcpb.GetAccountRewardByNameRequest) (*grpcpb.AccountRewardResponse, error)
- func (as *APIService) GetBlockTransactionsByNum(ctx context.Context, req *grpcpb.GetBlockTransactionsByNumRequest) (*grpcpb.GetBlockTransactionsByNumResponse, error)
- func (as *APIService) GetChainState(ctx context.Context, req *grpcpb.NonParamsRequest) (*grpcpb.GetChainStateResponse, error)
- func (as *APIService) GetFollowCountByName(ctx context.Context, req *grpcpb.GetFollowCountByNameRequest) (*grpcpb.GetFollowCountByNameResponse, error)
- func (as *APIService) GetFollowerListByName(ctx context.Context, req *grpcpb.GetFollowerListByNameRequest) (*grpcpb.GetFollowerListByNameResponse, error)
- func (as *APIService) GetFollowingListByName(ctx context.Context, req *grpcpb.GetFollowingListByNameRequest) (*grpcpb.GetFollowingListByNameResponse, error)
- func (as *APIService) GetPostListByCreated(ctx context.Context, req *grpcpb.GetPostListByCreatedRequest) (*grpcpb.GetPostListByCreatedResponse, error)
- func (as *APIService) GetReplyListByPostId(ctx context.Context, req *grpcpb.GetReplyListByPostIdRequest) (*grpcpb.GetReplyListByPostIdResponse, error)
- func (as *APIService) GetTrxById(ctx context.Context, req *grpcpb.GetTrxByIdRequest) (*grpcpb.GetTrxByIdResponse, error)
- func (as *APIService) GetWitnessList(ctx context.Context, req *grpcpb.GetWitnessListRequest) (*grpcpb.GetWitnessListResponse, error)
- type GRPCServer
Constants ¶
View Source
const ( // DefaultHTTPLimit default max http conns DefaultHTTPLimit = 128 // MaxGateWayRecvMsgSize Deafult max message size gateway's grpc client can receive MaxGateWayRecvMsgSize = 64 * 1024 * 1024 GRPCEndpointName = "rpc" GRPCEndpointUsage = "" )
View Source
const ( GRPCMaxRecvMsgSize = 4096 GRPCServerType = "tcp" )
Variables ¶
View Source
var (
ErrPanicResp = errors.New("rpc panic")
)
Functions ¶
Types ¶
type APIService ¶
type APIService struct {
// contains filtered or unexported fields
}
func (*APIService) BroadcastTrx ¶
func (as *APIService) BroadcastTrx(ctx context.Context, req *grpcpb.BroadcastTrxRequest) (*grpcpb.BroadcastTrxResponse, error)
func (*APIService) GetAccountByName ¶
func (as *APIService) GetAccountByName(ctx context.Context, req *grpcpb.GetAccountByNameRequest) (*grpcpb.AccountResponse, error)
func (*APIService) GetAccountRewardByName ¶
func (as *APIService) GetAccountRewardByName(ctx context.Context, req *grpcpb.GetAccountRewardByNameRequest) (*grpcpb.AccountRewardResponse, 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) 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) GetPostListByCreated ¶
func (as *APIService) GetPostListByCreated(ctx context.Context, req *grpcpb.GetPostListByCreatedRequest) (*grpcpb.GetPostListByCreatedResponse, error)
func (*APIService) GetReplyListByPostId ¶
func (as *APIService) GetReplyListByPostId(ctx context.Context, req *grpcpb.GetReplyListByPostIdRequest) (*grpcpb.GetReplyListByPostIdResponse, error)
func (*APIService) GetTrxById ¶
func (as *APIService) GetTrxById(ctx context.Context, req *grpcpb.GetTrxByIdRequest) (*grpcpb.GetTrxByIdResponse, error)
func (*APIService) GetWitnessList ¶
func (as *APIService) GetWitnessList(ctx context.Context, req *grpcpb.GetWitnessListRequest) (*grpcpb.GetWitnessListResponse, error)
type GRPCServer ¶
type GRPCServer struct {
// contains filtered or unexported fields
}
func NewGRPCServer ¶
func NewGRPCServer(ctx *node.ServiceContext, config service_configs.GRPCConfig) (*GRPCServer, 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. |
|
Package grpcpb is a reverse proxy.
|
Package grpcpb is a reverse proxy. |
Click to show internal directories.
Click to hide internal directories.