kafka

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 11 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
}

func New

func New(serviceName string, opts ...OptionFunc) (cli *Client, err error)

func (*Client) Consume

func (cli *Client) Consume(params interface{}) (err error)

func (*Client) Produce

func (cli *Client) Produce(ctx context.Context, msg interface{}) (
	response queue.ProduceResponse, err error,
)

func (*Client) Shutdown

func (cli *Client) Shutdown() (err error)

type ConsumeParams

type ConsumeParams struct {
	GroupID  string
	Topics   []string
	Consumer queue.Consumer
	// contains filtered or unexported fields
}

type Consumer

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

func (*Consumer) Cleanup

func (*Consumer) ConsumeClaim

func (c *Consumer) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error

func (*Consumer) Setup

type OptionFunc

type OptionFunc func(*options)

func AsyncConfig

func AsyncConfig(c *sarama.Config) OptionFunc

func ConsumeConfig

func ConsumeConfig(c *sarama.Config) OptionFunc

func OpenConsumeLog

func OpenConsumeLog() OptionFunc

func RefreshInterval

func RefreshInterval(t time.Duration) OptionFunc

func SyncConfig

func SyncConfig(c *sarama.Config) OptionFunc

type ProduceParams

type ProduceParams struct {
	Async   bool
	Message *sarama.ProducerMessage
}

Jump to

Keyboard shortcuts

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