dispatcher

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: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispatcher

type Dispatcher struct {
	clientdisp.Dispatcher
	// contains filtered or unexported fields
}

Dispatcher is responsible for handling all events, including connection and registration events originating from the client, and events originating from the event hub server. All events are processed in a single Go routine in order to avoid any race conditions. This avoids the need for synchronization.

func New

func New(context fabcontext.Client, chConfig fab.ChannelCfg, connectionProvider api.ConnectionProvider, opts ...options.Opt) *Dispatcher

New creates a new event hub dispatcher

func (*Dispatcher) Start

func (ed *Dispatcher) Start() error

Start starts the dispatcher

type RegisterInterestsEvent

type RegisterInterestsEvent struct {
	Interests []*pb.Interest
	ErrCh     chan<- error
}

RegisterInterestsEvent registers interests with the event hub

func NewRegisterInterestsEvent

func NewRegisterInterestsEvent(interests []*pb.Interest, errch chan<- error) *RegisterInterestsEvent

NewRegisterInterestsEvent returns a RegisterInterests event

type UnregisterInterestsEvent

type UnregisterInterestsEvent struct {
	Interests []*pb.Interest
	ErrCh     chan<- error
}

UnregisterInterestsEvent unregisters interests with the event hub

func NewUnregisterInterestsEvent

func NewUnregisterInterestsEvent(interests []*pb.Interest, errch chan<- error) *UnregisterInterestsEvent

NewUnregisterInterestsEvent returns an UnregisterInterests event

Jump to

Keyboard shortcuts

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