mocks

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OffsetParser

type OffsetParser struct {
	ToStringFn   func(o *kafka.Offset) string
	FromStringFn func(string) (*kafka.Offset, error)
}

func (*OffsetParser) FromString

func (m *OffsetParser) FromString(s string) (*kafka.Offset, error)

func (*OffsetParser) ToString

func (m *OffsetParser) ToString(o *kafka.Offset) string

type Reader

type Reader struct {
	FetchMessageFn  func(ctx context.Context) (*kafka.Message, error)
	CommitOffsetsFn func(ctx context.Context, offsets ...*kafka.Offset) error
	CloseFn         func() error
}

func (*Reader) Close

func (m *Reader) Close() error

func (*Reader) CommitOffsets

func (m *Reader) CommitOffsets(ctx context.Context, offsets ...*kafka.Offset) error

func (*Reader) FetchMessage

func (m *Reader) FetchMessage(ctx context.Context) (*kafka.Message, error)

type Writer

type Writer struct {
	WriteMessagesFn func(context.Context, uint64, ...kafka.Message) error
	CloseFn         func() error
	WriteCalls      uint64
}

func (*Writer) Close

func (m *Writer) Close() error

func (*Writer) GetWriteCalls

func (m *Writer) GetWriteCalls() uint64

func (*Writer) WriteMessages

func (m *Writer) WriteMessages(ctx context.Context, msgs ...kafka.Message) error

Jump to

Keyboard shortcuts

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