kafka

package
v0.0.0-...-36feab7 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Publisher

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

Publisher is an implementation of the Publisher interface for Kafka.

func NewPublisher

func NewPublisher(addr, topic string) *Publisher

NewPublisher returns a new instance of Publisher for the given address and topic.

func (*Publisher) Publish

func (p *Publisher) Publish(ctx context.Context, key string, message interface{}) error

Publish pushes a new message to Kafka, with the given key and a value as message as a JSON string.

Jump to

Keyboard shortcuts

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