kafka

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: MIT Imports: 8 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 is the 'api' of the kafka message-sender

func (*Client) Close

func (client *Client) Close() error

Close the kafka-producer

func (*Client) Send

func (client *Client) Send(buf []byte, headers map[string]string, dryRun bool) (string, error)

Send a kafka-message

type Config

type Config struct {
	Endpoint string `yaml:"endpoint"`
	Topic    string `yaml:"topic"`
	Key      string `yaml:"key"`
	Secret   string `yaml:"secret"`
	// contains filtered or unexported fields
}

Config is the Kafka-config that is imported in the `message`-object in the app

func (*Config) Connect

func (cfg *Config) Connect(dryRun bool) (*Client, error)

Connect is used to connect as a kafka-producer

Jump to

Keyboard shortcuts

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