kafka

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConsumerRoundRobinStrategy        = "round-robin"
	ConsumerCooperativeStickyStrategy = "cooperative-sticky"
	ConsumerRangeStrategy             = "range"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SchemaRegistry string `pipelane:"schema_registry"`
}

type ConsumerConfig

type ConsumerConfig struct {
	Kafka             `pipelane:",squash"`
	Config            `pipelane:",squash"`
	AutoCommitEnabled bool   `pipelane:"auto_commit_enabled"`
	ConsumerGroupID   string `pipelane:"consumer_group_id"`

	MaxPartitionFetchBytes string   `pipelane:"max_partition_fetch_bytes"`
	AutoOffsetReset        string   `pipelane:"auto_offset_reset"`
	FetchMaxBytes          string   `pipelane:"fetch_max_bytes"`
	BalancerStrategy       []string `pipelane:"balancer_strategy"`
}

func (*ConsumerConfig) Get

func (c *ConsumerConfig) Get()

func (*ConsumerConfig) GetFetchMaxBytes

func (c *ConsumerConfig) GetFetchMaxBytes() (int, error)

GetFetchMaxBytes "B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" OR "B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB".

func (*ConsumerConfig) GetMaxPartitionFetchBytes

func (c *ConsumerConfig) GetMaxPartitionFetchBytes() (int, error)

GetMaxPartitionFetchBytes "B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" OR "B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB".

type Kafka

type Kafka struct {
	SASLEnabled   bool     `pipelane:"sasl_enabled"`
	SASLMechanism string   `pipelane:"sasl_mechanism"`
	SASLUsername  string   `pipelane:"sasl_username"`
	SASLPassword  string   `pipelane:"sasl_password"`
	Brokers       string   `pipelane:"brokers"`
	Version       string   `pipelane:"version"`
	Topics        []string `pipelane:"topics"`
}

type ProducerConfig

type ProducerConfig struct {
	Kafka            `pipelane:",squash"`
	Config           `pipelane:",squash"`
	MaxRequestSize   string `pipelane:"max_request_size"`
	LingerMs         string `pipelane:"linger_ms"`
	BatchNumMessages *int   `pipelane:"batch_num_messages"`
}

func (*ProducerConfig) GetBatchNumMessages

func (p *ProducerConfig) GetBatchNumMessages() int

func (*ProducerConfig) GetLingerDurationMs

func (p *ProducerConfig) GetLingerDurationMs() (time.Duration, error)

func (*ProducerConfig) GetLingerMs

func (p *ProducerConfig) GetLingerMs() (int, error)

GetLingerMs "1 ms and etc".

func (*ProducerConfig) GetMaxRequestSize

func (p *ProducerConfig) GetMaxRequestSize() (int, error)

GetMaxRequestSize "B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" OR "B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB".

Jump to

Keyboard shortcuts

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