kdb

package
v0.0.0-...-91d2721 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeTopicName

func MakeTopicName(topicType string) string

MakeTopicName creates a topic name - adds the prefix if needed

func NewKafkaWriter

func NewKafkaWriter(ctx context.Context, topic string) (writer *kafka.Writer, err error)

Types

type AllWriters

type AllWriters struct {
	// contains filtered or unexported fields
}
var W AllWriters

W aka Writers is a globally shared set of topic:Writer instances

func (*AllWriters) Close

func (w *AllWriters) Close() error

func (*AllWriters) Get

func (w *AllWriters) Get(ctx context.Context, topic string) (*kafka.Writer, error)

Get or create the requested writer for the given topic - ctx is only used for new connections!

Jump to

Keyboard shortcuts

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