kafka

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: MIT Imports: 3 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 {
	Topic            string `default:""`
	Group            string `default:""`
	Brokers          string `default:"localhost:9092"`
	AutoOffsetReset  string `default:"earliest"` //earliest、latest
	SessionTimeoutMs int64  `default:"6000"`
}

func NewKafkaConfig

func NewKafkaConfig() *Config

func (*Config) GetAutoOffsetReset

func (c *Config) GetAutoOffsetReset() string

func (*Config) GetBrokers

func (c *Config) GetBrokers() string

func (*Config) GetGroup

func (c *Config) GetGroup() string

func (*Config) GetTopic

func (c *Config) GetTopic() string

func (*Config) SetAutoOffsetReset

func (c *Config) SetAutoOffsetReset(autoOffsetReset string) *Config

func (*Config) SetBrokers

func (c *Config) SetBrokers(brokerServer string) *Config

func (*Config) SetGroup

func (c *Config) SetGroup(group string) *Config

func (*Config) SetTopic

func (c *Config) SetTopic(topic string) *Config

type ConfigManage

type ConfigManage struct {
	// contains filtered or unexported fields
}

func NewKafkaConfigManage

func NewKafkaConfigManage() *ConfigManage

func (*ConfigManage) GetData

func (cm *ConfigManage) GetData(group string) (*Config, error)

func (*ConfigManage) SetData

func (cm *ConfigManage) SetData(group string, c *Config)

Jump to

Keyboard shortcuts

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