Documentation ¶
Index ¶
- type CacheKey
- type EventClientRef
- func (ref *EventClientRef) Close()
- func (ref *EventClientRef) Closed() bool
- func (ref *EventClientRef) RegisterBlockEvent(filter ...fab.BlockFilter) (fab.Registration, <-chan *fab.BlockEvent, error)
- func (ref *EventClientRef) RegisterChaincodeEvent(ccID, eventFilter string) (fab.Registration, <-chan *fab.CCEvent, error)
- func (ref *EventClientRef) RegisterFilteredBlockEvent() (fab.Registration, <-chan *fab.FilteredBlockEvent, error)
- func (ref *EventClientRef) RegisterTxStatusEvent(txID string) (fab.Registration, <-chan *fab.TxStatusEvent, error)
- func (ref *EventClientRef) Unregister(reg fab.Registration)
- type InfraProvider
- func (f *InfraProvider) Close()
- func (f *InfraProvider) CommManager() fab.CommManager
- func (f *InfraProvider) CreateChannelCfg(ctx fab.ClientContext, channelID string) (fab.ChannelCfg, error)
- func (f *InfraProvider) CreateChannelConfig(channelID string) (fab.ChannelConfig, error)
- func (f *InfraProvider) CreateChannelMembership(ctx fab.ClientContext, channelID string) (fab.ChannelMembership, error)
- func (f *InfraProvider) CreateChannelTransactor(reqCtx reqContext.Context, cfg fab.ChannelCfg) (fab.Transactor, error)
- func (f *InfraProvider) CreateEventService(ctx fab.ClientContext, channelID string) (fab.EventService, error)
- func (f *InfraProvider) CreateOrdererFromConfig(cfg *core.OrdererConfig) (fab.Orderer, error)
- func (f *InfraProvider) CreatePeerFromConfig(peerCfg *core.NetworkPeer) (fab.Peer, error)
- func (f *InfraProvider) Initialize(providers context.Providers) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheKey ¶
type CacheKey struct {
// contains filtered or unexported fields
}
CacheKey holds a key for the provider cache
func NewCacheKey ¶
func NewCacheKey(ctx fab.ClientContext, chConfig fab.ChannelCfg) (*CacheKey, error)
NewCacheKey returns a new CacheKey
func (*CacheKey) ChannelConfig ¶
func (k *CacheKey) ChannelConfig() fab.ChannelCfg
ChannelConfig returns the channel configuration
func (*CacheKey) Context ¶
func (k *CacheKey) Context() fab.ClientContext
Context returns the Context
type EventClientRef ¶
type EventClientRef struct {
// contains filtered or unexported fields
}
EventClientRef holds a reference to the event client and manages its lifecycle. When the idle timeout has been reached then the event client is closed. The next time the event client ref is accessed, a new event client is created. The EventClientRef implements all of the functions of fab.EventService, so the EventClientRef may be used wherever an EventService is required.
func NewEventClientRef ¶
func NewEventClientRef(idleTimeout time.Duration, evtClientProvider eventClientProvider) *EventClientRef
NewEventClientRef returns a new EventClientRef
func (*EventClientRef) Close ¶
func (ref *EventClientRef) Close()
Close immediately closes the connection.
func (*EventClientRef) Closed ¶
func (ref *EventClientRef) Closed() bool
Closed returns true if the event client is closed
func (*EventClientRef) RegisterBlockEvent ¶
func (ref *EventClientRef) RegisterBlockEvent(filter ...fab.BlockFilter) (fab.Registration, <-chan *fab.BlockEvent, error)
RegisterBlockEvent registers for block events.
func (*EventClientRef) RegisterChaincodeEvent ¶
func (ref *EventClientRef) RegisterChaincodeEvent(ccID, eventFilter string) (fab.Registration, <-chan *fab.CCEvent, error)
RegisterChaincodeEvent registers for chaincode events.
func (*EventClientRef) RegisterFilteredBlockEvent ¶
func (ref *EventClientRef) RegisterFilteredBlockEvent() (fab.Registration, <-chan *fab.FilteredBlockEvent, error)
RegisterFilteredBlockEvent registers for filtered block events.
func (*EventClientRef) RegisterTxStatusEvent ¶
func (ref *EventClientRef) RegisterTxStatusEvent(txID string) (fab.Registration, <-chan *fab.TxStatusEvent, error)
RegisterTxStatusEvent registers for transaction status events.
func (*EventClientRef) Unregister ¶
func (ref *EventClientRef) Unregister(reg fab.Registration)
Unregister removes the given registration and closes the event channel.
type InfraProvider ¶
type InfraProvider struct {
// contains filtered or unexported fields
}
InfraProvider represents the default implementation of Fabric objects.
func New ¶
func New(config core.Config, opts ...options.Opt) *InfraProvider
New creates a InfraProvider enabling access to core Fabric objects and functionality.
func (*InfraProvider) CommManager ¶
func (f *InfraProvider) CommManager() fab.CommManager
CommManager provides comm support such as GRPC onnections
func (*InfraProvider) CreateChannelCfg ¶
func (f *InfraProvider) CreateChannelCfg(ctx fab.ClientContext, channelID string) (fab.ChannelCfg, error)
CreateChannelCfg creates and caches the channel configuration
func (*InfraProvider) CreateChannelConfig ¶
func (f *InfraProvider) CreateChannelConfig(channelID string) (fab.ChannelConfig, error)
CreateChannelConfig initializes the channel config
func (*InfraProvider) CreateChannelMembership ¶
func (f *InfraProvider) CreateChannelMembership(ctx fab.ClientContext, channelID string) (fab.ChannelMembership, error)
CreateChannelMembership returns and caches a channel member identifier A membership reference is returned that refreshes with the configured interval
func (*InfraProvider) CreateChannelTransactor ¶
func (f *InfraProvider) CreateChannelTransactor(reqCtx reqContext.Context, cfg fab.ChannelCfg) (fab.Transactor, error)
CreateChannelTransactor initializes the transactor
func (*InfraProvider) CreateEventService ¶
func (f *InfraProvider) CreateEventService(ctx fab.ClientContext, channelID string) (fab.EventService, error)
CreateEventService creates the event service.
func (*InfraProvider) CreateOrdererFromConfig ¶
func (f *InfraProvider) CreateOrdererFromConfig(cfg *core.OrdererConfig) (fab.Orderer, error)
CreateOrdererFromConfig creates a default implementation of Orderer based on configuration.
func (*InfraProvider) CreatePeerFromConfig ¶
func (f *InfraProvider) CreatePeerFromConfig(peerCfg *core.NetworkPeer) (fab.Peer, error)
CreatePeerFromConfig returns a new default implementation of Peer based configuration
func (*InfraProvider) Initialize ¶
func (f *InfraProvider) Initialize(providers context.Providers) error
Initialize sets the provider context