config

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: May 24, 2019 License: MIT Imports: 12 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 {
	KafkaBrokers       []string `required:"true"`
	Topics             []string `required:"true"` // (example: '{"Topic1", "Topic2"}'
	OutputDir          string   `default:"OUTPUT_DATA"`
	KafkaClientID      string   `default:"kafka-dumper"`
	KafkaGroupID       string   `default:"kafka-dumper"`
	KafkaVersionString string   `default:"0.10.2.0"`
	Timezone           string   `default:"GMT"`
	Log                string   `default:"Info"`
	LocalLog           bool     `required:"false"` // if true  - will write log to stdout and to

	Overwrite bool `required:"false"` // if true - will create unique consumerID and messages will be received again
	Newest    bool `required:"false"` // if set true - will start dump all messages that appears in

	Init bool `required:"false"`
	// 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

func (c *Config) GetTimeZone() *time.Location

GetTimeZone - parses timezone string and return time.Location representation

func (*Config) KafkaVersion

func (c *Config) KafkaVersion() sarama.KafkaVersion

KafkaVersion getter

Jump to

Keyboard shortcuts

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