cConfig

package module
v0.0.52 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConf

func GetConf(name string) (interface{}, error)

func Inject

func Inject(instance interface{})

func InjectConf added in v0.0.52

func InjectConf(conf interface{})

func IsConf

func IsConf(instance interface{}) bool

func ListenConf

func ListenConf(names []string, handler HandleFunc)

func Load

func Load()

Types

type ConfigCenterConf

type ConfigCenterConf struct {
	Enable   bool                       `json:"enable"`
	Backup   bool                       `json:"backup"`
	Driver   string                     `json:"driver"`
	Interval int64                      `json:"interval"`
	Layers   int64                      `json:"layers"`
	Clients  *ConfigCenterConf_Clients  `json:"clients"`
	Listens  []*ConfigCenterConf_Listen `json:"listens"`
}

func GetConfigCenterConf added in v0.0.52

func GetConfigCenterConf() *ConfigCenterConf

func (*ConfigCenterConf) ConfigName

func (i *ConfigCenterConf) ConfigName() string

type ConfigCenterConf_Clients added in v0.0.9

type ConfigCenterConf_Clients struct {
	File  *ConfigCenterConf_FileClient  `json:"file"`
	Redis *ConfigCenterConf_RedisClient `json:"redis"`
	Nacos *ConfigCenterConf_NacosClient `json:"nacos"`
}

type ConfigCenterConf_FileClient added in v0.0.9

type ConfigCenterConf_FileClient struct {
	Namespace string `json:"namespace"`
	Path      string `json:"path"`
}

type ConfigCenterConf_Listen added in v0.0.9

type ConfigCenterConf_Listen struct {
	Group string `json:"group"`
	Data  string `json:"data"`
	Conf  string `json:"conf"`
}

type ConfigCenterConf_NacosClient added in v0.0.9

type ConfigCenterConf_NacosClient struct {
	Scheme    string `json:"scheme"`
	Host      string `json:"host"`
	Port      uint64 `json:"port"`
	Username  string `json:"username"`
	Password  string `json:"password"`
	Namespace string `json:"namespace"`
	Path      string `json:"path"`
}

type ConfigCenterConf_RedisClient added in v0.0.9

type ConfigCenterConf_RedisClient struct{}

type ConfigInterface

type ConfigInterface interface {
	ConfigName() string
}

type FileClient added in v0.0.9

type FileClient struct{}

type HandleFunc

type HandleFunc func()

type NacosClient added in v0.0.9

type NacosClient struct{}

Jump to

Keyboard shortcuts

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