config

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2018 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 {
	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

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