config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server      ServerConfig
	Kafka       KafkaConfig
	Consumer    ConsumerConfig
	Producer    ProducerConfig
	Replication ReplicationConfig
}

Config for the proxy

func Load

func Load(path string) (*Config, error)

type ConsumerConfig

type ConsumerConfig struct {
	OffsetAutoCommitInterval    duration `json:"offset_auto_commit_interval"`
	OffsetAutoReset             reset    `json:"offset_auto_reset"`
	ClaimPartitionRetryInterval duration `json:"claim_partition_retry_interval"`
	AutoReconnectInterval       duration `json:"auto_reconnect_interval"`
	UnackManagerSize            int      `json:"unack_manager_size"`
	//sarama config
	ChannelBufferSize int      `json:"channel_buffer_size"`
	FetchDefault      int32    `json:"fetch_default"`
	MaxWaitTime       duration `json:"max_wait_time"`
	MaxProcessingTime duration `json:"max_processing_time"`
}

type KafkaConfig

type KafkaConfig struct {
	Brokers          []string
	Version          version
	Zookeepers       []string
	ZKSessionTimeout duration
	ZKChroot         string
}

type ProducerConfig

type ProducerConfig struct {
	Clients         int
	MaxMessageBytes int
}

type ReplicationConfig

type ReplicationConfig struct {
	MyDatacenterName                string
	CrossDatacenterReplicationTopic string
	ReplicationAclUpdateInterval    duration
	BatchChecksumSize               int
	UUIDServers                     []string
}

type ServerConfig

type ServerConfig struct {
	Host            string
	Port            int
	AdminHost       string
	AdminPort       int
	LogDir          string
	LogFormat       string
	AccessLogEnable bool
}

Jump to

Keyboard shortcuts

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