Documentation ¶
Index ¶
- func FromArgument(arg string) []byte
- func NewRESTConfig() client.ChainClient
- func NewRPCConfig() client.RpcClient
- type ClientConn
- type RPCManager
- type Rpc
- type RpcBuilder
- func (b *RpcBuilder) Deploy(args [][]byte) (*pb.ChaincodeDeploymentSpec, error)
- func (b *RpcBuilder) Fire(args [][]byte) (string, error)
- func (b *RpcBuilder) GetBlock(blknum int64) (*pb.Block, error)
- func (b *RpcBuilder) GetCurrentBlock() (int64, error)
- func (b *RpcBuilder) GetTransaction(txid string) (*pb.Transaction, error)
- func (b *RpcBuilder) GetTxIndex(string) (int64, error)
- func (b *RpcBuilder) Query(args [][]byte) ([]byte, error)
- func (b *RpcBuilder) VerifyConn() error
- type RpcClientConfig
- type SecurityPolicy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromArgument ¶
func NewRESTConfig ¶
func NewRESTConfig() client.ChainClient
func NewRPCConfig ¶
Types ¶
type ClientConn ¶
type ClientConn struct { C *grpc.ClientConn BlockConn bool }
type RPCManager ¶
type RPCManager struct {
// contains filtered or unexported fields
}
func NewRpcManager ¶
func NewRpcManager() *RPCManager
func (*RPCManager) Cancel ¶
func (m *RPCManager) Cancel()
func (*RPCManager) Context ¶
func (m *RPCManager) Context() context.Context
type Rpc ¶
type Rpc struct { }
depecrated
func (*Rpc) NewManager ¶
func (_ *Rpc) NewManager() *RPCManager
type RpcBuilder ¶
type RpcBuilder struct { ChaincodeName string // ChaincodeLang string Function string Security *SecurityPolicy Conn ClientConn ConnManager *RPCManager TxTimeout time.Duration }
func (*RpcBuilder) Deploy ¶
func (b *RpcBuilder) Deploy(args [][]byte) (*pb.ChaincodeDeploymentSpec, error)
func (*RpcBuilder) GetCurrentBlock ¶
func (b *RpcBuilder) GetCurrentBlock() (int64, error)
also imply the chainAcquire
func (*RpcBuilder) GetTransaction ¶
func (b *RpcBuilder) GetTransaction(txid string) (*pb.Transaction, error)
func (*RpcBuilder) GetTxIndex ¶
func (b *RpcBuilder) GetTxIndex(string) (int64, error)
func (*RpcBuilder) VerifyConn ¶
func (b *RpcBuilder) VerifyConn() error
type RpcClientConfig ¶
func (*RpcClientConfig) Caller ¶
func (c *RpcClientConfig) Caller(spec *client.RpcSpec) (rpc.Caller, error)
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) Load ¶
func (c *RpcClientConfig) Load(vp *viper.Viper) error
the configuration for client can include these fields:
- chaincode
- username
- userattr (a list of strings)
- endpoint (for compatible, its subfield can be put in top level now but this will be deprecated later)
- server
- tlsenabled
- certfile
- hostname (override the hostname in certfile)
func (*RpcClientConfig) Quit ¶
func (c *RpcClientConfig) Quit()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.