config

package
Version: v0.0.0-...-b042743 Latest Latest
Warning

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

Go to latest
Published: May 12, 2017 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "0.0.1"

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectorInfo

type CollectorInfo struct {
	UnixDomainSocket string `mapstructure:"unix_domain_socket" json:"unix_domain_socket"`
	LogQueueSize     uint32 `mapstructure:"log_queue_size" json:"log_queue_size"`
}

Collector

type Config

type Config struct {
	Collector CollectorInfo `mapstructure:"collector" json:"collector"`
	Kafka     KafkaInfo     `mapstructure:"kafka" json:"kafka"`
}

Config sturcture

func GetConfig

func GetConfig() *Config

Get singleton config

func NewConfig

func NewConfig() *Config

New Config

func (*Config) Init

func (config *Config) Init(path string) error

Init config from json file

type KafkaInfo

type KafkaInfo struct {
	Broker        []string `mapstructure:"broker" json:"broker"`
	Topic         string   `mapstructure:"topic" json:"topic"`
	CompressCodec string   `mapstructure:"compress_codec" json:"compress_codec"`
}

Kafka

Source Files

Jump to

Keyboard shortcuts

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