client

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is used to communicate with worker by master.

func NewClient

func NewClient(index int, url string) *Client

NewClient create Client.

func (*Client) AfterRun

func (c *Client) AfterRun() error

AfterRun call user hook

func (*Client) BeforeRun

func (c *Client) BeforeRun() error

BeforeRun call user hook

func (*Client) CheckoutCollector

func (c *Client) CheckoutCollector() (collector.Collector, bool, error)

CheckoutCollector checkout collector.

func (*Client) Do

func (c *Client) Do() error

Do call the workers to running

func (*Client) Init

func (c *Client) Init() error

Init tell worker to init for execute tx.

func (*Client) SetContext

func (c *Client) SetContext(d []byte) error

SetContext set the context of worker passed from Master.

func (*Client) Statistics

func (c *Client) Statistics() (int64, int64)

Statistics get the number of sent and missed transactions

func (*Client) Teardown

func (c *Client) Teardown()

Teardown close the worker manually.

func (*Client) Testinit

func (c *Client) Testinit() error

Testinit used for unit test

func (*Client) TestsetNonce

func (c *Client) TestsetNonce() error

TestsetNonce used for unit test

Jump to

Keyboard shortcuts

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