kafkaClient

package
v0.0.0-...-defed71 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const AppName = "kafkaClient"

Variables

This section is empty.

Functions

func GetConsumer

func GetConsumer(topic, groupID string) *kafka.Reader

func GetProducer

func GetProducer(topic string) *kafka.Writer

Types

type Client

type Client struct {
	ioc.ObjectImpl

	Username string   `json:"username" yaml:"username"`
	Password string   `json:"password" yaml:"password"`
	Debug    bool     `json:"debug" yaml:"debug"`
	Brokers  []string `json:"brokers" yaml:"brokers"`
	Async    bool     `json:"async" yaml:"async"`
	Offset   int64    `json:"offset" yaml:"offset"`
	// contains filtered or unexported fields
}

func (*Client) Close

func (c *Client) Close(ctx context.Context) error

func (*Client) Consumer

func (c *Client) Consumer(topic, groupId string) *kafka.Reader

func (*Client) Init

func (c *Client) Init()

func (*Client) Name

func (c *Client) Name() string

func (*Client) Priority

func (c *Client) Priority() int

func (*Client) Producer

func (c *Client) Producer(topic string) *kafka.Writer

Jump to

Keyboard shortcuts

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