mock

package
v0.0.0-...-5a2a765 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMockDatabase

func NewMockDatabase(forceError bool) (database.Database, error)

func NewMockQueue

func NewMockQueue(forceError bool) (database.Stream, error)

Types

type MockDatabase

type MockDatabase struct {
	ForceError bool
	// contains filtered or unexported fields
}

func (*MockDatabase) Read

func (db *MockDatabase) Read(m *database.Message) error

func (*MockDatabase) ReadError

func (db *MockDatabase) ReadError(m *database.Message) error

func (*MockDatabase) Save

func (db *MockDatabase) Save(m *database.Message) error

func (*MockDatabase) SaveError

func (db *MockDatabase) SaveError(m *database.Message) error

type MockQueue

type MockQueue struct {
	ForceError bool
	// contains filtered or unexported fields
}

func (*MockQueue) Read

func (q *MockQueue) Read(ctx context.Context, fn database.MessageFn) error

func (*MockQueue) ReadError

func (q *MockQueue) ReadError(ctx context.Context, fn database.MessageFn) error

func (*MockQueue) Save

func (q *MockQueue) Save(m *database.Message) error

func (*MockQueue) SaveError

func (q *MockQueue) SaveError(m *database.Message) error

func (*MockQueue) StartWork

func (q *MockQueue) StartWork(db database.Database)

TODO: implement cancel channel

func (*MockQueue) StopWork

func (q *MockQueue) StopWork()

Jump to

Keyboard shortcuts

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