hyfabric

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	GetChainInfo       string = "GetChainInfo"
	GetBlockByNumber   string = "GetBlockByNumber"
	GetBlockByHash     string = "GetBlockByHash"
	GetTransactionByID string = "GetTransactionByID"
	GetBlockByTxID     string = "GetBlockByTxID"
	InnerCC            string = "qscc"
)

These are function names from Invoke first parameter 查询链数据 利用内置的cc :qscc

Variables

This section is empty.

Functions

func NewRPCConfig

func NewRPCConfig() client.RpcClient

Types

type RpcClientConfig

type RpcClientConfig struct {
	TxTimeout time.Duration
	// contains filtered or unexported fields
}

func (*RpcClientConfig) Caller

func (c *RpcClientConfig) Caller(spec *client.RpcSpec) (rpc.Caller, error)

Caller Assign each http request (run cocurrency) a client, which can be adapted to a caller the client is "lazy" connect: it just do connect when required (a request has come) and wait for connect finish

func (*RpcClientConfig) Chain

func (c *RpcClientConfig) Chain() (client.ChainInfo, error)

返回链信息的接口

func (*RpcClientConfig) Load

func (c *RpcClientConfig) Load(vp *viper.Viper) error

Load 利用viper 加载配置 配置文件参考core.yaml

func (*RpcClientConfig) Quit

func (c *RpcClientConfig) Quit()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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