config

package
v0.0.0-...-431a833 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultConfigurationName = "config"
	DefaultConfigurationType = "yaml"
	DefaultWorkDirectory     = "./etc"
)

全局常量定义

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RedisOptions *redis.Options `json:"redisOptions,omitempty" yaml:"redisOptions,omitempty" xml:"redisOptions,omitempty" mapstructure:"redis"`
	MysqlOptions *mysql.Options `json:"mysqlOptions,omitempty" yaml:"mysqlOptions,omitempty" xml:"mysqlOptions,omitempty" mapstructure:"mysql"`
	KafkaOptions *kafka.Options `json:"kafkaOptions,omitempty" yaml:"kafkaOptions,omitempty" xml:"kafkaOptions,omitempty" mapstructure:"kafka"`
}

Config 全局配置

func LoadFromDisk

func LoadFromDisk(ctx context.Context) (*Config, error)

LoadFromDisk 初始化配置文件

func New

func New() *Config

New 初始化全局配置

Jump to

Keyboard shortcuts

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