client

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: MIT Imports: 17 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 {
	Client *kgo.Client
	// contains filtered or unexported fields
}

A client providing broker APIs

func New

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

Create a new client

func (*Client) AlterConfigsMethod

func (cl *Client) AlterConfigsMethod() string

The alter configs method that should be used (auto, incremental, non-incremental)

func (*Client) TimeoutMs

func (cl *Client) TimeoutMs() int32

Timeout in milliseconds to be used by requests with timeouts

type ClientConfig

type ClientConfig 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"`
}

Client configuration

Jump to

Keyboard shortcuts

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