helper

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClosePool

func ClosePool()

func Init

func Init(BlockChainMonitorUrl []string, MaxConnectionNum, InitConnectionNum int)

Types

type Client

type Client struct {
	Id string
	rpcClient.Client
}

func GetClient

func GetClient() *Client

get client from pool

func (*Client) HeartBeat

func (c *Client) HeartBeat() error

func (*Client) Release

func (c *Client) Release()

release client

type EndPoint

type EndPoint struct {
	Address   string
	Available bool
}

type PoolFactory

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

func (*PoolFactory) ActivateObject

func (f *PoolFactory) ActivateObject(ctx context.Context, object *commonPool.PooledObject) error

func (*PoolFactory) DestroyObject

func (f *PoolFactory) DestroyObject(ctx context.Context, object *commonPool.PooledObject) error

func (*PoolFactory) GetEndPoint

func (f *PoolFactory) GetEndPoint() EndPoint

func (*PoolFactory) MakeObject

func (f *PoolFactory) MakeObject(ctx context.Context) (*commonPool.PooledObject, error)

func (*PoolFactory) PassivateObject

func (f *PoolFactory) PassivateObject(ctx context.Context, object *commonPool.PooledObject) error

func (*PoolFactory) ValidateObject

func (f *PoolFactory) ValidateObject(ctx context.Context, object *commonPool.PooledObject) bool

Jump to

Keyboard shortcuts

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