connection

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultDialerTimeout is how long to wait for TCP connection to be established with bootstrap.
	DefaultDialerTimeout = 10 * time.Second

	// DefaultKeepAlive is how long an unused connection should be kept open in the hope of re-use.
	DefaultKeepAlive = 10 * time.Minute
)

Variables

This section is empty.

Functions

func NewDialer

func NewDialer(conf *Settings) (*kafka.Dialer, error)

NewDialer is a dialer factory.

Types

type Settings

type Settings struct {
	// Connection.
	Bootstrap          []string `cfg:"bootstrap" validate:"required"`
	InsecureSkipVerify bool     `cfg:"insecure_skip_verify"`

	// Credentials.
	Username string `cfg:"username"`
	Password string `cfg:"password"`
}

func ParseSettings

func ParseSettings(c cfg.Config, name string) *Settings

Jump to

Keyboard shortcuts

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