config

package
v0.0.0-...-f6ff08b Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	USAGE = "Usage: asyncflow [-e <test|prod>]"
)

Variables

View Source
var (
	TestFilePath string
)

Functions

func GetConfEnv

func GetConfEnv() string

GetConfEnv 获取配置的环境变量

func Init

func Init()

func InitConf

func InitConf(env string)

InitConf 初始化配置

Types

type TaskConfig

type TaskConfig struct {
	TableMaxRows        int   `toml:"table_max_rows"`
	AliveThreshold      int   `toml:"alive_threshold"`
	SplitInterval       int   `toml:"split_interval"`
	LongProcessInterval int   `toml:"long_process_interval"`
	MoveInterval        int   `toml:"move_interval"`
	MaxProcessTime      int64 `toml:"max_process_time"`
}

type TomlConfig

type TomlConfig struct {
	Common commonConfig
	MySQL  mysqlConfig
	Redis  redisConfig
	Task   TaskConfig
}

TomlConfig 配置

var Conf *TomlConfig

func (*TomlConfig) LoadConfig

func (c *TomlConfig) LoadConfig(env string)

LoadConfig 导入配置 toml导入

Jump to

Keyboard shortcuts

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