chclient

package
v0.0.0-...-e171dc0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package chclient enables channel client

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelClient

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

ChannelClient enables access to a Fabric network.

func NewChannelClient

func NewChannelClient(client fab.FabricClient, channel fab.Channel, discovery fab.DiscoveryService, selection fab.SelectionService, eventHub fab.EventHub) (*ChannelClient, error)

NewChannelClient returns a ChannelClient instance.

func (*ChannelClient) Close

func (cc *ChannelClient) Close() error

Close releases channel client resources (disconnects event hub etc.)

func (*ChannelClient) ExecuteTx

func (cc *ChannelClient) ExecuteTx(request apitxn.ExecuteTxRequest) (apitxn.TransactionID, error)

ExecuteTx prepares and executes transaction

func (*ChannelClient) ExecuteTxWithOpts

func (cc *ChannelClient) ExecuteTxWithOpts(request apitxn.ExecuteTxRequest, opts apitxn.ExecuteTxOpts) (apitxn.TransactionID, error)

ExecuteTxWithOpts allows the user to provide options for execute transaction: sync vs async, filter to inspect proposal response before commit etc)

func (*ChannelClient) Query

func (cc *ChannelClient) Query(request apitxn.QueryRequest) ([]byte, error)

Query chaincode

func (*ChannelClient) QueryWithOpts

func (cc *ChannelClient) QueryWithOpts(request apitxn.QueryRequest, opts apitxn.QueryOpts) ([]byte, error)

QueryWithOpts allows the user to provide options for query (sync vs async, etc.)

func (*ChannelClient) RegisterChaincodeEvent

func (cc *ChannelClient) RegisterChaincodeEvent(notify chan<- *apitxn.CCEvent, chainCodeID string, eventID string) apitxn.Registration

RegisterChaincodeEvent registers chain code event @param {chan bool} channel which receives event details when the event is complete @returns {object} object handle that should be used to unregister

func (*ChannelClient) UnregisterChaincodeEvent

func (cc *ChannelClient) UnregisterChaincodeEvent(registration apitxn.Registration) error

UnregisterChaincodeEvent removes chain code event registration

Jump to

Keyboard shortcuts

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