mockeventhub

package
v0.2.12-metrics Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockEventHub

type MockEventHub struct {
	Adapter          consumer.EventAdapter
	Interests        []*pb.Interest
	NumStartFailures int
}

MockEventHub mocks out the Event Hub

func New

func New(adapter consumer.EventAdapter) *MockEventHub

New returns a new MockEventHub

func (*MockEventHub) Disconnect

func (m *MockEventHub) Disconnect(err error)

Disconnect simulates a disconnect

func (*MockEventHub) ProduceEvent

func (m *MockEventHub) ProduceEvent(event *pb.Event)

ProduceEvent produces a new event, which is sent to the adapter

func (*MockEventHub) Start

func (m *MockEventHub) Start() error

Start implements the Start() method on the relay.EventHub interface

Jump to

Keyboard shortcuts

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