consumer

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2016 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 EventAdapter

type EventAdapter interface {
	GetInterestedEvents() ([]*ehpb.Interest, error)
	Recv(msg *ehpb.OpenchainEvent) (bool, error)
	Disconnected(err error)
}

EventAdapter is the interface by which a openchain event client registers interested events and receives messages from the openchain event Server

type OpenchainEventsClient

type OpenchainEventsClient struct {
	// contains filtered or unexported fields
}

OpenchainEventsClient holds the stream and adapter for consumer to work with

func NewOpenchainEventsClient

func NewOpenchainEventsClient(peerAddress string, adapter EventAdapter) *OpenchainEventsClient

NewOpenchainEventsClient Returns a new grpc.ClientConn to the configured local PEER.

func (*OpenchainEventsClient) Start

func (ec *OpenchainEventsClient) Start() error

Start establishes connection with Event hub and registers interested events with it

func (*OpenchainEventsClient) Stop

func (ec *OpenchainEventsClient) Stop() error

Stop terminates connection with event hub

Jump to

Keyboard shortcuts

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