chpvdr

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: 4 Imported by: 0

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

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

Ledger providers a client for the current context and named channel.

Jump to

Keyboard shortcuts

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