Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Init bool `required:"false"` OutputDir string `default:"OUTPUT_DATA"` KafkaClientID string `default:"kafka-dumper"` KafkaGroupID string `default:"kafka-dumper"` KafkaVersionString string `default:"0.10.2.0"` KafkaBrokers []string `required:"true"` Timezone string `default:"GMT"` Log string `default:"Info"` LocalLog bool `required:"false"` // if true - will write log to stdout and to file kafka-dump.log at OutputDir Overwrite bool `required:"false"` // if true - will create unique consumerID and messages will be received again Topics []string `required:"true"` // (example: '{"Topic1", "Topic2"}' Newest bool `required:"false"` // if set true - will start dump all messages that appears in kafka after start of tool // contains filtered or unexported fields }
Config stores service config parameters
func LoadConfig ¶
func LoadConfig() *Config
LoadConfig loads configuration for service to struct Config and store topics to Topics map
func (*Config) GetTimeZone ¶
GetTimeZone - parses timezone string and return time.Location representation
func (*Config) KafkaVersion ¶
func (c *Config) KafkaVersion() sarama.KafkaVersion
KafkaVersion getter
Click to show internal directories.
Click to hide internal directories.