kafkastreamer

package module
v0.0.0-...-516621c Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: BSD-3-Clause Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnector

func NewConnector(brokers []string, c *sarama.Config, t Translator, topic string) *connector

Types

type Option

type Option func(*StreamConstructor)

func WithConfig

func WithConfig(config *sarama.Config) Option

type Receiver

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

func (*Receiver) Close

func (r *Receiver) Close() error

func (*Receiver) Recv

func (r *Receiver) Recv(ctx context.Context) (*workflow.Event, workflow.Ack, error)

type Sender

type Sender struct {
	Topic         string
	Writer        sarama.SyncProducer
	WriterTimeout time.Duration
}

func (*Sender) Close

func (p *Sender) Close() error

func (*Sender) Send

func (p *Sender) Send(ctx context.Context, foreignID string, statusType int, headers map[workflow.Header]string) error

type StreamConstructor

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

func New

func New(brokers []string, opts ...Option) *StreamConstructor

func (StreamConstructor) NewReceiver

func (s StreamConstructor) NewReceiver(
	ctx context.Context,
	topic string,
	name string,
	opts ...workflow.ReceiverOption,
) (workflow.EventReceiver, error)

func (StreamConstructor) NewSender

func (s StreamConstructor) NewSender(ctx context.Context, topic string) (workflow.EventSender, error)

type Translator

type Translator func(m *sarama.ConsumerMessage) *workflow.ConnectorEvent

Jump to

Keyboard shortcuts

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