producer

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 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 Client

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

Client produces kafka messages

func NewClient

func NewClient() *Client

NewClient constructs a new producer client

func (*Client) Close

func (client *Client) Close() error

Close closes the Kafka client producer

func (*Client) Connect

func (client *Client) Connect(brokers []string, config *sarama.Config) error

Connect initializes and opens a new Sarama producer group.

func (*Client) Healthy added in v0.4.0

func (client *Client) Healthy() bool

Healthy checks the health of the Kafka client

func (*Client) Publish

func (client *Client) Publish(produce *commander.Message) error

Publish publishes the given message

Jump to

Keyboard shortcuts

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