Documentation ¶
Index ¶
- type Config
- func (c *Config) GetAutoOffsetReset() string
- func (c *Config) GetBrokers() string
- func (c *Config) GetGroup() string
- func (c *Config) GetTopic() string
- func (c *Config) SetAutoOffsetReset(autoOffsetReset string) *Config
- func (c *Config) SetBrokers(brokerServer string) *Config
- func (c *Config) SetGroup(group string) *Config
- func (c *Config) SetTopic(topic string) *Config
- type ConfigManage
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 (*Config) GetBrokers ¶
func (*Config) SetAutoOffsetReset ¶
func (*Config) SetBrokers ¶
type ConfigManage ¶
type ConfigManage struct {
// contains filtered or unexported fields
}
func NewKafkaConfigManage ¶
func NewKafkaConfigManage() *ConfigManage
func (*ConfigManage) SetData ¶
func (cm *ConfigManage) SetData(group string, c *Config)
Click to show internal directories.
Click to hide internal directories.