reader

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Topic     string            `json:"topic"`
	Partition int32             `json:"partition"`
	Offset    int64             `json:"offset"`
	Value     []byte            `json:"value"`
	Key       []byte            `json:"key,omitempty"`
	Headers   map[string]string `json:"headers,omitempty"`
}

type Reader

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

func New

func New(t *testing.T, c sarama.Consumer) *Reader

func (*Reader) Read

func (r *Reader) Read(ctx context.Context, timeout time.Duration, topic string) *sarama.ConsumerMessage

func (*Reader) Stop

func (r *Reader) Stop() error

Jump to

Keyboard shortcuts

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