conf

package
v0.0.0-...-d5aecf8 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CMD_TEMP = "%s  consumerProgress -n %s |grep -v OFFLINE|egrep -v group_con_gps_sync_test|egrep -v group_con_gps_storage_trace"
)

Functions

func LoadConfigFromEnv

func LoadConfigFromEnv() error

LoadConfigFromEnv 从环境变量中加载配置

Types

type Config

type Config struct {
	Mode MODE `toml:"mode"`

	CmdConfig  *cmdConfig  `toml:"cmd"`
	FileConfig *fileConfig `toml:"file"`
}

func C

func C() *Config

C 全局配置对象

func NewDefaultConfig

func NewDefaultConfig() *Config

type MODE

type MODE string
const (
	// 通过执行命令获取数据
	CMD_MODE MODE = "cmd"
	// 通过文件获取数据
	FILE_MODE MODE = "file"
)

Jump to

Keyboard shortcuts

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