fabric-sdk-go: github.com/hyperledger/fabric-sdk-go/pkg/fab/events/endpoint Index | Files

package endpoint

import "github.com/hyperledger/fabric-sdk-go/pkg/fab/events/endpoint"


Package Files

endpoint.go endpointdiscovery.go

type DiscoveryWrapper Uses

type DiscoveryWrapper struct {
    // contains filtered or unexported fields

DiscoveryWrapper wraps a target discovery service and adds endpoint data to each of the discovered peers.

func NewEndpointDiscoveryWrapper Uses

func NewEndpointDiscoveryWrapper(ctx context.Client, channelID string, target fab.DiscoveryService, opts ...Opt) (*DiscoveryWrapper, error)

NewEndpointDiscoveryWrapper returns a new event endpoint discovery service that wraps a given target discovery service and adds endpoint data to each of the discovered peers.

func (*DiscoveryWrapper) GetPeers Uses

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

GetPeers returns the discovered peers

type EventEndpoint Uses

type EventEndpoint struct {
    Certificate *x509.Certificate
    // contains filtered or unexported fields

EventEndpoint extends a Peer endpoint

func FromPeerConfig Uses

func FromPeerConfig(config fab.EndpointConfig, peer fab.Peer, peerCfg *fab.PeerConfig) *EventEndpoint

FromPeerConfig creates a new EventEndpoint from the given config

func (*EventEndpoint) BlockHeight Uses

func (e *EventEndpoint) BlockHeight() uint64

BlockHeight returns the block height of the peer. If the peer doesn't contain any state info then 0 is returned.

func (*EventEndpoint) Opts Uses

func (e *EventEndpoint) Opts() []options.Opt

Opts returns additional options for the event connection

type Opt Uses

type Opt func(p *DiscoveryWrapper)

Opt is a discoveryProvider option

func WithTargetFilter Uses

func WithTargetFilter(filter fab.TargetFilter) Opt

WithTargetFilter applies the target filter to the discovery provider

Package endpoint imports 8 packages (graph) and is imported by 1 packages. Updated 2019-05-03. Refresh now. Tools for package owners.