conf

package
v0.0.0-...-cc206ec Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfigFromEnv

func LoadConfigFromEnv() error

LoadConfigFromEnv 从环境变量中加载配置

func LoadConfigFromToml

func LoadConfigFromToml(filePath string) error

LoadConfigFromToml 从toml中添加配置文件, 并初始化全局对象

func XX

func XX()

Types

type Config

type Config struct {
	App     *app        `toml:"app"`
	Mongo   *mongodb    `toml:"mongodb"`
	Mcenter *rpc.Config `toml:"mcenter"`
}

func C

func C() *Config

C 全局配置对象

func (*Config) GetMcenterClient

func (c *Config) GetMcenterClient() (*rpc.ClientSet, error)

Jump to

Keyboard shortcuts

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