client

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2018 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInstance

func GetInstance(channelID string, txnSnapConfig api.Config, serviceProviderFactory apisdk.ServiceProviderFactory) (api.Client, error)

GetInstance returns a singleton instance of the fabric client

func GetInstanceWithLocalDiscovery

func GetInstanceWithLocalDiscovery(channelID string, txnSnapConfig api.Config) (api.Client, error)

GetInstanceWithLocalDiscovery returns a singleton instance of the fabric client with local discovery

func NewCustomConfigProvider

func NewCustomConfigProvider(config coreApi.Config, localPeer *api.PeerConfig, localPeerTLSCertPem []byte) coreApi.ConfigProvider

NewCustomConfigProvider return custom config provider

Types

type CustomConfig

type CustomConfig struct {
	coreApi.Config
	// contains filtered or unexported fields
}

CustomConfig override client config

func (*CustomConfig) ChannelPeers

func (c *CustomConfig) ChannelPeers(name string) ([]coreApi.ChannelPeer, error)

ChannelPeers returns the channel peers configuration TODO this is a workaround. Currently there is no way to pass in a set of target peers to the selection provider.

func (*CustomConfig) PeerConfigByURL

func (c *CustomConfig) PeerConfigByURL(url string) (*coreApi.PeerConfig, error)

PeerConfigByURL return local peer

type DynamicProviderFactory

type DynamicProviderFactory struct {
	defsvc.ProviderFactory
	ChannelUsers []selection.ChannelUser
}

DynamicProviderFactory is configured with dynamic discovery provider and dynamic selection provider

func (*DynamicProviderFactory) CreateDiscoveryProvider

func (f *DynamicProviderFactory) CreateDiscoveryProvider(config coreApi.Config, fabPvdr fabApi.InfraProvider) (fabApi.DiscoveryProvider, error)

CreateDiscoveryProvider returns a new implementation of dynamic discovery provider

func (*DynamicProviderFactory) CreateSelectionProvider

func (f *DynamicProviderFactory) CreateSelectionProvider(config coreApi.Config) (fabApi.SelectionProvider, error)

CreateSelectionProvider returns a new implementation of dynamic selection provider

Directories

Path Synopsis
msp

Jump to

Keyboard shortcuts

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