config

package
v0.0.0-...-c3b74a3 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 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 {
	TestFlag      bool   `json:"TestFlag"`
	ListenPort    int    `json:"ListenPort"`
	Clickhouse    string `json:"Clickhouse"`
	Redis         string `json:"Redis"`
	FlushInterval int    `json:"FlushInterval"`
	FlushCount    int    `json:"FlushCount"`
	TableRules    struct {
		Main      TableRule   `json:"main"`
		Secondary []TableRule `json:"secondary"`
	} `json:"TableRules"`
}

type Env

type Env struct {
	Db     *sqlx.DB
	Redis  *redis.Client
	Config *Config
	// contains filtered or unexported fields
}

func NewEnv

func NewEnv(path string) *Env

func (*Env) InitLog

func (e *Env) InitLog()

func (*Env) Initredis

func (e *Env) Initredis()

type TableRule

type TableRule struct {
	Title   string   `json:"title"`
	Key     []string `json:"key"`
	Version string   `json:"version"`
}

TableRule struct incapsulates a specific table config - it's title ( fully qualified ), slice of key column and version column name

Jump to

Keyboard shortcuts

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