chclient

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2019 License: Apache-2.0 Imports: 13 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 New

func New(c Context) (*ChannelClient, error)

New returns a ChannelClient instance.

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.

Jump to

Keyboard shortcuts

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