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.Event) (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 EventsClient ¶
type EventsClient struct {
// contains filtered or unexported fields
}
EventsClient holds the stream and adapter for consumer to work with
func NewEventsClient ¶
func NewEventsClient(peerAddress string, adapter EventAdapter) *EventsClient
NewEventsClient Returns a new grpc.ClientConn to the configured local PEER.
func (*EventsClient) Start ¶
func (ec *EventsClient) Start() error
Start establishes connection with Event hub and registers interested events with it
func (*EventsClient) Stop ¶
func (ec *EventsClient) Stop() error
Stop terminates connection with event hub
Click to show internal directories.
Click to hide internal directories.