conf_center

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRegisteredConfigCenter added in v1.7.0

func GetRegisteredConfigCenter() map[string]ConfigCenter

func RegisterConfigCenter added in v1.7.0

func RegisterConfigCenter(c ConfigCenter)

Types

type Config added in v1.6.0

type Config struct {
	// 配置格式
	Format encoding.Format `flag:"name:format;default:toml;usage:配置格式" comment:"toml,json,yaml,yml"`
	// 配置类型
	ConfigType string `flag:"name:conf_type;default:local;usage:配置类型"`
	// config字段顺序不能变,ConfigCenter 保持在最后
	ConfigCenter ConfigCenter
}

type ConfigCenter

type ConfigCenter interface {
	HandleConfig(func([]byte)) error
	Type() string
}

func GetConfigCenter added in v1.7.0

func GetConfigCenter(configType string) ConfigCenter

type ConfigType

type ConfigType string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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