Documentation ¶
Index ¶
- Constants
- func Get(key string) interface{}
- func GetById(name, key string) interface{}
- func GetDubboInstance() *dubbo.Instance
- func InitFrmDubboNacos() error
- func Load(key string) *viper.Viper
- func LoadConfig(configPath string) error
- func NewInstance(opts ...dubbo.InstanceOption) error
- func SetOpts(opts ...dubbo.InstanceOption)
- func Store(key, val string)
- type AppConfig
- type Clientconfig
- type NacosConfig
- type Others
- type Serverconfigs
- type Service
- type ViperListener
Constants ¶
View Source
const ( CONFIG_SERVER = "_viper_config_server" // 配置服务器的键名 TMP_DIR = "tmp" // 临时文件路径 TMP_PORT_FILE = "port.txt" // 临时端口文件路径 )
常量定义
Variables ¶
This section is empty.
Functions ¶
func InitFrmDubboNacos ¶
func InitFrmDubboNacos() error
Types ¶
type AppConfig ¶
type AppConfig struct { Mode string `yaml:"mode"` Nacos NacosConfig `yaml:"nacos"` Isremote bool `yaml:"isremote"` }
func (AppConfig) DefaultInstanceOptions ¶
func (app AppConfig) DefaultInstanceOptions() []dubbo.InstanceOption
func (AppConfig) NewDubboInstance ¶
type Clientconfig ¶
type NacosConfig ¶
type NacosConfig struct { Clientconfig Clientconfig `yaml:"clientconfig"` Serverconfigs []Serverconfigs `yaml:"serverconfigs"` Service Service `yaml:"service"` }
type Serverconfigs ¶
type Service ¶
type Service struct { Clustername string `yaml:"clustername"` Ephemeral bool `yaml:"ephemeral"` Groupname string `yaml:"groupname"` Servicename string `yaml:"servicename"` Weight int `yaml:"weight"` Others []Others `yaml:"others"` Enable bool `yaml:"enable"` Healthy bool `yaml:"healthy"` Ip string `yaml:"ip"` Port int `yaml:"port"` MetricPort int `yaml:"metricport"` }
type ViperListener ¶
func NewViperListener ¶
func NewViperListener(name string, group string) *ViperListener
func (ViperListener) Parse ¶
func (l ViperListener) Parse(key string, val interface{})
func (ViperListener) Process ¶
func (l ViperListener) Process(event *config_center.ConfigChangeEvent)
Click to show internal directories.
Click to hide internal directories.