client

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2018 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ServiceProviderFactory apisdk.ServiceProviderFactory

ServiceProviderFactory use to pass service provider factory(mock for unit test)

Functions

func GetInstance

func GetInstance(channelID string, txnSnapConfig api.Config) (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 NewCustomConfig added in v0.2.0

func NewCustomConfig(config fabApi.EndpointConfig, localPeer *api.PeerConfig, localPeerTLSCertPem []byte) fabApi.EndpointConfig

NewCustomConfig return custom endpoint config

Types

type CacheKey added in v0.2.0

type CacheKey interface {
	lazycache.Key
	ChannelID() string
	TxnSnapConfig() api.Config
	ServiceProviderFactory() apisdk.ServiceProviderFactory
}

CacheKey config cache reference cache key

type CustomConfig

type CustomConfig struct {
	fabApi.EndpointConfig
	// contains filtered or unexported fields
}

CustomConfig override client config

func (*CustomConfig) ChannelPeers

func (c *CustomConfig) ChannelPeers(name string) ([]fabApi.ChannelPeer, bool)

ChannelPeers returns the channel peers configuration

type DynamicProviderFactory

type DynamicProviderFactory struct {
	defsvc.ProviderFactory
}

DynamicProviderFactory returns a Channel Provider that uses a dynamic discovery provider based on the local Membership Snap, dynamic selection provider, and the local Event Snap

func (*DynamicProviderFactory) CreateChannelProvider added in v0.2.0

func (f *DynamicProviderFactory) CreateChannelProvider(config fabApi.EndpointConfig) (fabApi.ChannelProvider, error)

CreateChannelProvider returns a new default implementation of channel provider

Directories

Path Synopsis
msp

Jump to

Keyboard shortcuts

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