kafka

package
v1.15.5 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigAdd

func ConfigAdd(path string)

func NewConn

func NewConn(ctx context.Context) (*kafka.Conn, error)

NewConn returns connection with default options.

func NewConnWithConfigPath

func NewConnWithConfigPath(ctx context.Context, path string) (*kafka.Conn, error)

NewConnWithConfigPath returns connection with options from config path.

func NewConnWithOptions

func NewConnWithOptions(ctx context.Context, o *Options) (conn *kafka.Conn, err error)

NewConnWithOptions returns connection with options.

Types

type Options

type Options struct {
	Address   string
	Topic     string
	Partition int
	Network   string
	ConnType  string
}

Options kafka connection options.

func NewOptions

func NewOptions() (*Options, error)

NewOptions returns options from config file or environment vars.

func NewOptionsWithPath

func NewOptionsWithPath(path string) (opts *Options, err error)

NewOptionsWithPath unmarshals a given key path into options and returns it.

Jump to

Keyboard shortcuts

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