fabpvdr

package
v1.0.0-alpha3 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2018 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

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

func (*CacheKey) String

func (k *CacheKey) String() string

String returns the key as a string

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) Close

func (f *InfraProvider) Close()

Close frees resources and caches.

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

Jump to

Keyboard shortcuts

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