mock

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2019 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventsBackend

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

EventsBackend fakes the event backend by setting up a very basic message broker in memory and tunneling all messages over it.

func NewEventsBackend

func NewEventsBackend(ownAddr string) *EventsBackend

NewEventsBackend returns a new EventsBackend

func (*EventsBackend) PublishEvent

func (mb *EventsBackend) PublishEvent(topic string, data []byte) error

PublishEvent is a mock implementation meant for testing.

func (*EventsBackend) Subscribe

func (mb *EventsBackend) Subscribe(ctx context.Context, topic string) (eventsBackend.Subscription, error)

Subscribe is a mock implementation meant for testing.

Jump to

Keyboard shortcuts

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