client

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package client implements the creation of a Kafka client.

Package client implements the creation of a Kafka client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Client *kgo.Client
	// contains filtered or unexported fields
}

Client represents a Kafka client.

func New

func New(cc *Config) (*Client, error)

New creates a new client.

func (*Client) AlterConfigsMethod

func (cl *Client) AlterConfigsMethod() string

AlterConfigsMethod is the alter configs method that should be used (auto, incremental, non-incremental).

func (*Client) TimeoutMs

func (cl *Client) TimeoutMs() int32

TimeoutMs is the timeout in milliseconds to be used by requests with timeouts.

type Config added in v0.1.0

type Config struct {
	SeedBrokers []string    `json:"seedBrokers,omitempty"`
	TLS         *tlsConfig  `json:"tls,omitempty"`
	SASL        *saslConfig `json:"sasl,omitempty"`

	// Set the maximum Kafka version to try (e.g. '0.8.0', '2.3.0').
	AsVersion string `json:"asVersion,omitempty"`
	// Underlying Kafka client log-level (none, error, warn, info, debug).
	LogLevel string `json:"logLevel,omitempty"`

	// Timeout in milliseconds to be used by requests with timeouts.
	TimeoutMs int32 `json:"timeoutMs,omitempty"`
	// The alter configs method that should be used (auto, incremental, non-incremental).
	AlterConfigsMethod string `json:"alterConfigsMethod,omitempty"`
}

Config represents configuration for the creation of a client.

Jump to

Keyboard shortcuts

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