Documentation ¶
Index ¶
- func GetInstance(channelID string, txnSnapConfig api.Config, ...) (api.Client, error)
- func GetInstanceWithLocalDiscovery(channelID string, txnSnapConfig api.Config) (api.Client, error)
- func NewCustomConfigProvider(config coreApi.Config, localPeer *api.PeerConfig, localPeerTLSCertPem []byte) coreApi.ConfigProvider
- type CustomConfig
- type DynamicProviderFactory
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 ¶
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 ¶
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