config

package
v0.0.0-...-cb7ffae Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2020 License: Apache-2.0 Imports: 8 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 {
	Name      string          `yaml:"name"`
	Addr      string          `yaml:"addr"`
	Log       string          `yaml:"log"`
	Segment   SegmentConfig   `yaml:"segment"`
	Snowflake SnowflakeConfig `yaml:"snowflake"`
}

func Load

func Load(args []string) (*Config, error)

type SegmentConfig

type SegmentConfig struct {
	Enable bool   `yaml:"enable"`
	DBHost string `yaml:"db_host"`
	DBName string `yaml:"db_name"`
	DBUser string `yaml:"db_user"`
	DBPass string `yaml:"db_pass"`
}

func (*SegmentConfig) DBUrl

func (c *SegmentConfig) DBUrl() string

type SnowflakeConfig

type SnowflakeConfig struct {
	Enable        bool   `yaml:"enable"`
	RedisAddresss string `yaml:"redis_addr"`
}

Jump to

Keyboard shortcuts

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