connection

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	SourceURL string
	Event     interface{}
}

Event contains the event hub event as well as the event source

func NewEvent

func NewEvent(event interface{}, sourceURL string) *Event

NewEvent returns a new event hub event

type EventHubConnection

type EventHubConnection struct {
	*comm.StreamConnection
	// contains filtered or unexported fields
}

EventHubConnection manages the connection and client stream to the event hub server

func New

func New(ctx fabcontext.Client, chConfig fab.ChannelCfg, url string, opts ...options.Opt) (*EventHubConnection, error)

New returns a new Connection to the event hub.

func (*EventHubConnection) EventHubStream

func (c *EventHubConnection) EventHubStream() pb.Events_ChatClient

EventHubStream returns the event hub chat client

func (*EventHubConnection) Receive

func (c *EventHubConnection) Receive(eventch chan<- interface{})

Receive receives events from the event hub server

func (*EventHubConnection) Send

func (c *EventHubConnection) Send(emsg *pb.Event) error

Send sends an event to the event hub server

Jump to

Keyboard shortcuts

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