kafkaproducer

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Code generated by mockery v1.0.0. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorProducer

type ErrorProducer struct {
	KafkaProducer
}

ErrorProducer is a firebolt node for producing EventError messages onto a Kafka topic.

func (*ErrorProducer) Process

func (ep *ErrorProducer) Process(event *firebolt.Event) (*firebolt.Event, error)

Process sends an EventError to the configured Kafka topic as a JSON string.

type KafkaProducer

type KafkaProducer struct {
	fbcontext.ContextAware
	// contains filtered or unexported fields
}

KafkaProducer is a firebolt node for producing messages onto a Kafka topic.

func (*KafkaProducer) Process

func (k *KafkaProducer) Process(event *firebolt.Event) (*firebolt.Event, error)

Process sends a single event `msg` to the configured Kafka topic.

func (*KafkaProducer) Produce

func (k *KafkaProducer) Produce(msg *kafka.Message)

Produce produces a single client-constructed kafka.Message to the configured Kafka topic.

func (*KafkaProducer) Receive

func (k *KafkaProducer) Receive(msg fbcontext.Message) error

Receive handles a message from another node or an external source

func (*KafkaProducer) Setup

func (k *KafkaProducer) Setup(config map[string]string) error

Setup creates the underlying Kafka producer client and events receiver, leaving it ready to handle events.

func (*KafkaProducer) Shutdown

func (k *KafkaProducer) Shutdown() error

Shutdown stops the underlying Kafka producer client.

type MessageProducer

type MessageProducer interface {
	ProduceChannel() chan *kafka.Message
	Events() chan kafka.Event
	Flush(timeoutMs int) int
	Close()
}

MessageProducer is an interface extracted from 'kafka.Producer' to make this mockable generated from this dir with 'mockery -name messageProducer -inpkg .' in case that interface changes

type MockMessageProducer

type MockMessageProducer struct {
	mock.Mock
}

MockMessageProducer is an autogenerated mock type for the MessageProducer type

func (*MockMessageProducer) Close

func (_m *MockMessageProducer) Close()

Close provides a mock function with given fields:

func (*MockMessageProducer) Events

func (_m *MockMessageProducer) Events() chan kafka.Event

Events provides a mock function with given fields:

func (*MockMessageProducer) Flush

func (_m *MockMessageProducer) Flush(timeoutMs int) int

Flush provides a mock function with given fields: timeoutMs

func (*MockMessageProducer) ProduceChannel

func (_m *MockMessageProducer) ProduceChannel() chan *kafka.Message

ProduceChannel provides a mock function with given fields:

Jump to

Keyboard shortcuts

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