kafka

package
v0.0.0-...-3e16b6b Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Reader(ctx context.Context, topicConfig Config) (Reader, error)
	Writer(ctx context.Context, topicConfig Config) (Writer, error)
}

Client ...

func NewClient

func NewClient(config Config, tracer opentracing.Tracer, logger Logger) Client

NewClient ...

type Config

type Config struct {
	Topic            string
	BootstrapServers []string
}

Config ...

type Logger

type Logger interface {
	Info(ctx context.Context, msg string, keysAndValues ...interface{})
	Error(ctx context.Context, msg string, keysAndValues ...interface{})
}

Logger ...

type Message

type Message struct {
	Key       string
	Headers   map[string]string
	Offset    int32
	Partition int32
	// contains filtered or unexported fields
}

Message ...

func (*Message) Done

func (m *Message) Done()

Done ...

type Reader

type Reader interface {
	Read(ctx context.Context) (*Message, error)
}

Reader ...

type Response

type Response struct {
	Partition int32
	Offset    int64
}

Response ...

type Writer

type Writer interface {
	Write(ctx context.Context, key string, value []byte) (Response, error)
}

Writer ...

Jump to

Keyboard shortcuts

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