mocks

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package mocks contains mocks for testing purposes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPublisher

func NewPublisher() messaging.Publisher

NewPublisher returns mock message publisher.

Types

type EventStore

type EventStore struct {
	mock.Mock
}

EventStore is an autogenerated mock type for the EventStore type

func NewEventStore

func NewEventStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *EventStore

NewEventStore creates a new instance of EventStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*EventStore) Connect

func (_m *EventStore) Connect(ctx context.Context, clientID string) error

Connect provides a mock function with given fields: ctx, clientID

func (*EventStore) Disconnect

func (_m *EventStore) Disconnect(ctx context.Context, clientID string) error

Disconnect provides a mock function with given fields: ctx, clientID

type MockPublisher

type MockPublisher struct{}

func (MockPublisher) Close

func (pub MockPublisher) Close() error

func (MockPublisher) Publish

func (pub MockPublisher) Publish(ctx context.Context, topic string, msg *messaging.Message) error

Jump to

Keyboard shortcuts

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