Documentation ¶
Overview ¶
Package chclient enables channel client
Index ¶
- type ChannelClient
- func (cc *ChannelClient) Close() error
- func (cc *ChannelClient) Execute(request chclient.Request, options ...chclient.Option) (chclient.Response, error)
- func (cc *ChannelClient) InvokeHandler(handler chclient.Handler, request chclient.Request, options ...chclient.Option) (chclient.Response, error)
- func (cc *ChannelClient) Query(request chclient.Request, options ...chclient.Option) (chclient.Response, error)
- func (cc *ChannelClient) RegisterChaincodeEvent(notify chan<- *chclient.CCEvent, chainCodeID string, eventID string) (chclient.Registration, error)
- func (cc *ChannelClient) UnregisterChaincodeEvent(registration chclient.Registration) error
- type Context
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 (*ChannelClient) Close ¶
func (cc *ChannelClient) Close() error
Close releases channel client resources (disconnects event hub etc.)
func (*ChannelClient) Execute ¶
func (cc *ChannelClient) Execute(request chclient.Request, options ...chclient.Option) (chclient.Response, error)
Execute prepares and executes transaction using request and optional options provided
func (*ChannelClient) InvokeHandler ¶
func (cc *ChannelClient) InvokeHandler(handler chclient.Handler, request chclient.Request, options ...chclient.Option) (chclient.Response, error)
InvokeHandler invokes handler using request and options provided
func (*ChannelClient) Query ¶
func (cc *ChannelClient) Query(request chclient.Request, options ...chclient.Option) (chclient.Response, error)
Query chaincode using request and optional options provided
func (*ChannelClient) RegisterChaincodeEvent ¶
func (cc *ChannelClient) RegisterChaincodeEvent(notify chan<- *chclient.CCEvent, chainCodeID string, eventID string) (chclient.Registration, error)
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 chclient.Registration) error
UnregisterChaincodeEvent removes chain code event registration
type Context ¶
type Context struct { fab.ProviderContext DiscoveryService fab.DiscoveryService SelectionService fab.SelectionService Channel fab.Channel EventHub fab.EventHub }
Context holds the providers and services needed to create a ChannelClient.