client

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: MIT Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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