rpc

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2018 License: MIT Imports: 23 Imported by: 1

Documentation

Index

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

func Dial

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

func Run

func Run(config *service_configs.GRPCConfig) error

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) 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.
Package grpcpb is a reverse proxy.
Package grpcpb is a reverse proxy.

Jump to

Keyboard shortcuts

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