Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelProvider ¶
type ChannelProvider struct {
// contains filtered or unexported fields
}
ChannelProvider keeps context across ChannelService instances.
TODO: add cache for dynamic channel configuration. This cache is updated by channel services, as only channel service have an identity context. TODO: add listener for channel config changes. Upon channel config change, underlying channel services need to recreate their channel clients.
func New ¶
func New(fabricProvider api.FabricProvider) (*ChannelProvider, error)
New creates a ChannelProvider based on a context
func (*ChannelProvider) NewChannelService ¶
func (cp *ChannelProvider) NewChannelService(ic apifabclient.IdentityContext, channelID string) (apifabclient.ChannelService, error)
NewChannelService creates a ChannelService for an identity
type ChannelService ¶
type ChannelService struct {
// contains filtered or unexported fields
}
ChannelService provides Channel clients and maintains contexts for them. the identity context is used
TODO: add cache for channel rather than reconstructing each time.
func (*ChannelService) Channel ¶
func (cs *ChannelService) Channel() (apifabclient.Channel, error)
Channel returns the named Channel client.
func (*ChannelService) Config ¶
func (cs *ChannelService) Config() (apifabclient.ChannelConfig, error)
Config returns the Config for the named channel
func (*ChannelService) EventHub ¶
func (cs *ChannelService) EventHub() (apifabclient.EventHub, error)
EventHub returns the EventHub for the named channel.
func (*ChannelService) Ledger ¶
func (cs *ChannelService) Ledger() (apifabclient.ChannelLedger, error)
Ledger providers a client for the current context and named channel.