fabric-sdk-go: github.com/hyperledger/fabric-sdk-go/pkg/client/common/discovery/dynamicdiscovery Index | Files

package dynamicdiscovery

import "github.com/hyperledger/fabric-sdk-go/pkg/client/common/discovery/dynamicdiscovery"

Index

Package Files

chservice.go localprovider.go localservice.go opts.go service.go

Constants

const (
    // AccessDenied indicates that the user does not have permission to perform the operation
    AccessDenied = "access denied"
)

func WithErrorHandler Uses

func WithErrorHandler(value fab.ErrorHandler) coptions.Opt

WithErrorHandler sets the error handler

func WithRefreshInterval Uses

func WithRefreshInterval(value time.Duration) coptions.Opt

WithRefreshInterval sets the interval in which the peer cache is refreshed

func WithResponseTimeout Uses

func WithResponseTimeout(value time.Duration) coptions.Opt

WithResponseTimeout sets the Discover service response timeout

type ChannelService Uses

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 Uses

func NewChannelService(ctx contextAPI.Client, membership fab.ChannelMembership, 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 Uses

func (s *ChannelService) Close()

Close releases resources

func (ChannelService) GetPeers Uses

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

GetPeers returns the available peers

type DiscoveryClient Uses

type DiscoveryClient interface {
    Send(ctx context.Context, req *fabdiscovery.Request, targets ...fab.PeerConfig) ([]fabdiscovery.Response, error)
}

DiscoveryClient is the client to the discovery service

type DiscoveryError Uses

type DiscoveryError error

DiscoveryError is an error originating at the Discovery service

type LocalProvider Uses

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 Uses

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

NewLocalProvider creates a new local dynamic discovery provider

func (*LocalProvider) Close Uses

func (p *LocalProvider) Close()

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

func (*LocalProvider) CloseContext Uses

func (p *LocalProvider) CloseContext(ctx fab.ClientContext)

CloseContext frees resources and caches for the given context.

func (*LocalProvider) CreateLocalDiscoveryService Uses

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

CreateLocalDiscoveryService returns a local discovery service

type LocalService Uses

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 Uses

func (s *LocalService) Close()

Close releases resources

func (LocalService) GetPeers Uses

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

GetPeers returns the available peers

func (*LocalService) Initialize Uses

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

Initialize initializes the service with local context

Package dynamicdiscovery imports 14 packages (graph) and is imported by 1 packages. Updated 2019-08-12. Refresh now. Tools for package owners.