provider

package
v1.2.15-prerelease07 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package provider is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterDecoder

func RegisterDecoder(queueType string, decoderConstructor DecoderConstructor) error

RegisterDecoder registers a decoder constructor for a given queue type

func RegisterQueueProvider

func RegisterQueueProvider(queueType string, queueConstructor QueueConstructor) error

RegisterQueueProvider registers a queue constructor for a given queue type

Types

type Consumer

type Consumer interface {
	Start() error
	Stop()
}

type Decoder

type Decoder interface {
	Decode(any) error
}

type DecoderConstructor

type DecoderConstructor func(*types.DataBlob) Decoder

func GetDecoder

func GetDecoder(queueType string) (DecoderConstructor, bool)

GetDecoder returns a decoder constructor for a given queue type

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) EXPECT

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

func (*MockConsumer) Start

func (m *MockConsumer) Start() error

Start mocks base method.

func (*MockConsumer) Stop

func (m *MockConsumer) Stop()

Stop mocks base method.

type MockConsumerMockRecorder

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

MockConsumerMockRecorder is the mock recorder for MockConsumer.

func (*MockConsumerMockRecorder) Start

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

Start indicates an expected call of Start.

func (*MockConsumerMockRecorder) Stop

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

Stop indicates an expected call of Stop.

type MockDecoder

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

MockDecoder is a mock of Decoder interface.

func NewMockDecoder

func NewMockDecoder(ctrl *gomock.Controller) *MockDecoder

NewMockDecoder creates a new mock instance.

func (*MockDecoder) Decode

func (m *MockDecoder) Decode(arg0 any) error

Decode mocks base method.

func (*MockDecoder) EXPECT

func (m *MockDecoder) EXPECT() *MockDecoderMockRecorder

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

type MockDecoderMockRecorder

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

MockDecoderMockRecorder is the mock recorder for MockDecoder.

func (*MockDecoderMockRecorder) Decode

func (mr *MockDecoderMockRecorder) Decode(arg0 interface{}) *gomock.Call

Decode indicates an expected call of Decode.

type MockQueue

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

MockQueue is a mock of Queue interface.

func NewMockQueue

func NewMockQueue(ctrl *gomock.Controller) *MockQueue

NewMockQueue creates a new mock instance.

func (*MockQueue) CreateConsumer

func (m *MockQueue) CreateConsumer(arg0 *Params) (Consumer, error)

CreateConsumer mocks base method.

func (*MockQueue) CreateProducer

func (m *MockQueue) CreateProducer(arg0 *Params) (messaging.Producer, error)

CreateProducer mocks base method.

func (*MockQueue) EXPECT

func (m *MockQueue) EXPECT() *MockQueueMockRecorder

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

func (*MockQueue) ID

func (m *MockQueue) ID() string

ID mocks base method.

type MockQueueMockRecorder

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

MockQueueMockRecorder is the mock recorder for MockQueue.

func (*MockQueueMockRecorder) CreateConsumer

func (mr *MockQueueMockRecorder) CreateConsumer(arg0 interface{}) *gomock.Call

CreateConsumer indicates an expected call of CreateConsumer.

func (*MockQueueMockRecorder) CreateProducer

func (mr *MockQueueMockRecorder) CreateProducer(arg0 interface{}) *gomock.Call

CreateProducer indicates an expected call of CreateProducer.

func (*MockQueueMockRecorder) ID

func (mr *MockQueueMockRecorder) ID() *gomock.Call

ID indicates an expected call of ID.

type Params

type Params struct {
	Logger         log.Logger
	MetricsClient  metrics.Client
	FrontendClient frontend.Client
}

type Queue

type Queue interface {
	ID() string
	CreateConsumer(*Params) (Consumer, error)
	CreateProducer(*Params) (messaging.Producer, error)
}

Queue is an interface for async queue

type QueueConstructor

type QueueConstructor func(Decoder) (Queue, error)

func GetQueueProvider

func GetQueueProvider(queueType string) (QueueConstructor, bool)

GetQueueProvider returns a queue constructor for a given queue type

Jump to

Keyboard shortcuts

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