endpoint

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: 13 Imported by: 27

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscoveryProvider

type DiscoveryProvider struct {
	fab.DiscoveryProvider
	// contains filtered or unexported fields
}

DiscoveryProvider is a wrapper around a discovery provider that converts each peer into an EventEndpoint. The EventEndpoint provides additional connection options.

func NewDiscoveryProvider

func NewDiscoveryProvider(ctx context.Client, opts ...Opt) *DiscoveryProvider

NewDiscoveryProvider returns a new event endpoint discovery provider

func (*DiscoveryProvider) CreateDiscoveryService

func (p *DiscoveryProvider) CreateDiscoveryService(channelID string) (fab.DiscoveryService, error)

CreateDiscoveryService creates a new DiscoveryService for the given channel

type EventEndpoint

type EventEndpoint struct {
	fab.Peer
	EvtURL          string
	HostOverride    string
	Certificate     *x509.Certificate
	KeepAliveParams keepalive.ClientParameters
	FailFast        bool
	ConnectTimeout  time.Duration
	AllowInsecure   bool
}

EventEndpoint extends a Peer endpoint and provides the event URL, which, in the case of Eventhub, is different from the peer endpoint

func FromPeerConfig

func FromPeerConfig(config core.Config, peer fab.Peer, peerCfg *core.PeerConfig) (*EventEndpoint, error)

FromPeerConfig creates a new EventEndpoint from the given config

func (*EventEndpoint) EventURL

func (e *EventEndpoint) EventURL() string

EventURL returns the event URL

func (*EventEndpoint) Opts

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

Opts returns additional options for the event connection

type Opt

type Opt func(p *DiscoveryProvider)

Opt is a discoveryProvider option

func WithTargetFilter

func WithTargetFilter(filter fab.TargetFilter) Opt

WithTargetFilter applies the target filter to the discovery provider

Jump to

Keyboard shortcuts

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