dynamicdiscovery

package
Version: v1.0.0-alpha4 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithRefreshInterval

func WithRefreshInterval(value time.Duration) coptions.Opt

WithRefreshInterval sets the interval in which the peer cache is refreshed

func WithResponseTimeout

func WithResponseTimeout(value time.Duration) coptions.Opt

WithResponseTimeout sets the Discover service response timeout

Types

type ChannelService

type ChannelService struct {
	// contains filtered or unexported fields
}

ChannelService implements a dynamic Discovery Service that queries Fabric's Discovery service for information about the peers that are currently joined to the given channel.

func NewChannelService

func NewChannelService(ctx contextAPI.Client, channelID string, opts ...coptions.Opt) (*ChannelService, error)

NewChannelService creates a Discovery Service to query the list of member peers on a given channel.

func (*ChannelService) Close

func (s *ChannelService) Close()

Close releases resources

func (ChannelService) GetPeers

func (s ChannelService) GetPeers() ([]fab.Peer, error)

GetPeers returns the available peers

type LocalProvider

type LocalProvider struct {
	// contains filtered or unexported fields
}

LocalProvider implements a local Dynamic Discovery LocalProvider that queries Fabric's Discovery service for information about the peers that are in the local MSP.

func NewLocalProvider

func NewLocalProvider(config fab.EndpointConfig, opts ...coptions.Opt) *LocalProvider

NewLocalProvider creates a new local dynamic discovery provider

func (*LocalProvider) Close

func (p *LocalProvider) Close()

Close will close the cache and all services contained by the cache.

func (*LocalProvider) CreateLocalDiscoveryService

func (p *LocalProvider) CreateLocalDiscoveryService(mspID string) (fab.DiscoveryService, error)

CreateLocalDiscoveryService returns a local discovery service

type LocalService

type LocalService struct {
	// contains filtered or unexported fields
}

LocalService implements a dynamic Discovery Service that queries Fabric's Discovery service for the peers that are in the local MSP.

func (*LocalService) Close

func (s *LocalService) Close()

Close releases resources

func (LocalService) GetPeers

func (s LocalService) GetPeers() ([]fab.Peer, error)

GetPeers returns the available peers

func (*LocalService) Initialize

func (s *LocalService) Initialize(ctx contextAPI.Local) error

Initialize initializes the service with local context

Jump to

Keyboard shortcuts

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