messaging

package
v0.0.0-...-4877f23 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package messaging is a generated GoMock package.

Index

Constants

View Source
const (
	Delay = 2 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection[T ConnectionTypes] interface {
	Context() Context
	Connect() (T, error)
	Close()
}

type ConnectionDialer

type ConnectionDialer[T ConnectionTypes] func(url string) (T, error)

type ConnectionTypes

type ConnectionTypes interface {
	*amqp.Connection | *stream.Environment
	IsClosed() bool
	Close() error
}

type Consumer

type Consumer interface {
	Context() Context
	Consume(ctx context.Context) (Event, error)
	Close()
	Set(property string, value any)
}

type Context

type Context interface {
	Url() string
	Server() string
	Set(property string, value string)
}

type Event

type Event = chan string

type Listener

type Listener[T ListenerTypes] interface {
	OnMessage(ctx context.Context, message T) error
}

type ListenerTypes

type ListenerTypes interface {
	*amqp.Delivery | *samqp.Message
}

type MockConnection

type MockConnection[T ConnectionTypes] struct {
	// contains filtered or unexported fields
}

MockConnection is a mock of Connection interface.

func NewMockConnection

func NewMockConnection[T ConnectionTypes](ctrl *gomock.Controller) *MockConnection[T]

NewMockConnection creates a new mock instance.

func (*MockConnection[T]) Close

func (m *MockConnection[T]) Close()

Close mocks base method.

func (*MockConnection[T]) Connect

func (m *MockConnection[T]) Connect() (T, error)

Connect mocks base method.

func (*MockConnection[T]) Context

func (m *MockConnection[T]) Context() Context

Context mocks base method.

func (*MockConnection[T]) EXPECT

func (m *MockConnection[T]) EXPECT() *MockConnectionMockRecorder[T]

EXPECT returns an object that allows the caller to indicate expected use.

type MockConnectionMockRecorder

type MockConnectionMockRecorder[T ConnectionTypes] struct {
	// contains filtered or unexported fields
}

MockConnectionMockRecorder is the mock recorder for MockConnection.

func (*MockConnectionMockRecorder[T]) Close

func (mr *MockConnectionMockRecorder[T]) Close() *gomock.Call

Close indicates an expected call of Close.

func (*MockConnectionMockRecorder[T]) Connect

func (mr *MockConnectionMockRecorder[T]) Connect() *gomock.Call

Connect indicates an expected call of Connect.

func (*MockConnectionMockRecorder[T]) Context

func (mr *MockConnectionMockRecorder[T]) Context() *gomock.Call

Context indicates an expected call of Context.

type MockConsumer

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

MockConsumer is a mock of Consumer interface.

func NewMockConsumer

func NewMockConsumer(ctrl *gomock.Controller) *MockConsumer

NewMockConsumer creates a new mock instance.

func (*MockConsumer) Close

func (m *MockConsumer) Close()

Close mocks base method.

func (*MockConsumer) Consume

func (m *MockConsumer) Consume(ctx context.Context) (Event, error)

Consume mocks base method.

func (*MockConsumer) Context

func (m *MockConsumer) Context() Context

Context mocks base method.

func (*MockConsumer) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockConsumer) Set

func (m *MockConsumer) Set(property string, value any)

Set mocks base method.

type MockConsumerMockRecorder

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

MockConsumerMockRecorder is the mock recorder for MockConsumer.

func (*MockConsumerMockRecorder) Close

func (mr *MockConsumerMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

func (*MockConsumerMockRecorder) Consume

func (mr *MockConsumerMockRecorder) Consume(ctx any) *gomock.Call

Consume indicates an expected call of Consume.

func (*MockConsumerMockRecorder) Context

func (mr *MockConsumerMockRecorder) Context() *gomock.Call

Context indicates an expected call of Context.

func (*MockConsumerMockRecorder) Set

func (mr *MockConsumerMockRecorder) Set(property, value any) *gomock.Call

Set indicates an expected call of Set.

type MockContext

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

MockContext is a mock of Context interface.

func NewMockContext

func NewMockContext(ctrl *gomock.Controller) *MockContext

NewMockContext creates a new mock instance.

func (*MockContext) EXPECT

func (m *MockContext) EXPECT() *MockContextMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockContext) Server

func (m *MockContext) Server() string

Server mocks base method.

func (*MockContext) Set

func (m *MockContext) Set(property, value string)

Set mocks base method.

func (*MockContext) Url

func (m *MockContext) Url() string

Url mocks base method.

type MockContextMockRecorder

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

MockContextMockRecorder is the mock recorder for MockContext.

func (*MockContextMockRecorder) Server

func (mr *MockContextMockRecorder) Server() *gomock.Call

Server indicates an expected call of Server.

func (*MockContextMockRecorder) Set

func (mr *MockContextMockRecorder) Set(property, value any) *gomock.Call

Set indicates an expected call of Set.

func (*MockContextMockRecorder) Url

func (mr *MockContextMockRecorder) Url() *gomock.Call

Url indicates an expected call of Url.

type MockListener

type MockListener[T ListenerTypes] struct {
	// contains filtered or unexported fields
}

MockListener is a mock of Listener interface.

func NewMockListener

func NewMockListener[T ListenerTypes](ctrl *gomock.Controller) *MockListener[T]

NewMockListener creates a new mock instance.

func (*MockListener[T]) EXPECT

func (m *MockListener[T]) EXPECT() *MockListenerMockRecorder[T]

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockListener[T]) OnMessage

func (m *MockListener[T]) OnMessage(ctx context.Context, message T) error

OnMessage mocks base method.

type MockListenerMockRecorder

type MockListenerMockRecorder[T ListenerTypes] struct {
	// contains filtered or unexported fields
}

MockListenerMockRecorder is the mock recorder for MockListener.

func (*MockListenerMockRecorder[T]) OnMessage

func (mr *MockListenerMockRecorder[T]) OnMessage(ctx, message any) *gomock.Call

OnMessage indicates an expected call of OnMessage.

type MockProducer

type MockProducer[T PublishingTypes] struct {
	// contains filtered or unexported fields
}

MockProducer is a mock of Producer interface.

func NewMockProducer

func NewMockProducer[T PublishingTypes](ctrl *gomock.Controller) *MockProducer[T]

NewMockProducer creates a new mock instance.

func (*MockProducer[T]) Close

func (m *MockProducer[T]) Close()

Close mocks base method.

func (*MockProducer[T]) Context

func (m *MockProducer[T]) Context() Context

Context mocks base method.

func (*MockProducer[T]) EXPECT

func (m *MockProducer[T]) EXPECT() *MockProducerMockRecorder[T]

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockProducer[T]) Produce

func (m *MockProducer[T]) Produce(ctx context.Context, message T) error

Produce mocks base method.

type MockProducerMockRecorder

type MockProducerMockRecorder[T PublishingTypes] struct {
	// contains filtered or unexported fields
}

MockProducerMockRecorder is the mock recorder for MockProducer.

func (*MockProducerMockRecorder[T]) Close

func (mr *MockProducerMockRecorder[T]) Close() *gomock.Call

Close indicates an expected call of Close.

func (*MockProducerMockRecorder[T]) Context

func (mr *MockProducerMockRecorder[T]) Context() *gomock.Call

Context indicates an expected call of Context.

func (*MockProducerMockRecorder[T]) Produce

func (mr *MockProducerMockRecorder[T]) Produce(ctx, message any) *gomock.Call

Produce indicates an expected call of Produce.

type Producer

type Producer[T PublishingTypes] interface {
	Context() Context
	Produce(ctx context.Context, message T) error
	Close()
}

type PublishingTypes

type PublishingTypes interface {
	*amqp.Publishing | *samqp.AMQP10
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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