call

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2018 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Display

func Display(results chan string, flag bool)

Display ...

func Handle

func Handle(handler Handler, num int, results chan<- string)

Handle ...

func InitClients

func InitClients(addrs []string)

InitClients inits rpc clients.

func Register

func Register(handleType string, handle Handler)

Register ...

func Run

func Run(handleType string, amount int, tps int, prepare int, flag bool)

Run ...

func SendTx

func SendTx(stx *tx.Tx, i int) (string, error)

SendTx ...

func ToTxRequest

func ToTxRequest(t *tx.Tx) *rpcpb.TransactionRequest

ToTxRequest ...

Types

type GrpcClient

type GrpcClient struct {
	rpcpb.ApiServiceClient
	// contains filtered or unexported fields
}

GrpcClient wraps ApiServiceClient with a semaphore.

func GetClient

func GetClient(i int) *GrpcClient

GetClient returns the corresponding grpc client.

func (*GrpcClient) Addr

func (c *GrpcClient) Addr() string

Addr returns the address.

type Handler

type Handler interface {
	Prepare() error
	Run(i int) (interface{}, error)
}

Handler ...

Jump to

Keyboard shortcuts

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