Documentation ¶
Overview ¶
包 configer 实现了读取nacos配置的封装
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ClientConfig constant.ClientConfig ServerConfig []constant.ServerConfig }
用于连接nacos的client 的config信息
func (*Config) CreateNewConfigClient ¶
func (c *Config) CreateNewConfigClient() config_client.IConfigClient
CreateNewConfigClient 创建用于查询配置的客户端
type Configer ¶
type Configer struct { Viper *viper.Viper ServerConfig NacosServerConfig ClientConfig NacosClientConfig Params Params }
包含了 viper.Viper 的结构体
func (*Configer) BindNacosClientParams ¶
func (*Configer) BindTargetParams ¶
func (*Configer) ReadParamsFromFile ¶
从配置文件中获取连接nacos的配置信息
type FilePath ¶
func ParseFilePath ¶
type NacosClientConfig ¶
type NacosServerConfig ¶
type Params ¶
需要获取的nacos上的config
func (*Params) GetNacosConfig ¶
func (p *Params) GetNacosConfig(configClient config_client.IConfigClient) (string, error)
GetNacosConfig 从Nacos中读取配置
func (*Params) PublishNacosConfig ¶
func (p *Params) PublishNacosConfig(configClient config_client.IConfigClient) (bool, error)
PublishNacosConfig 从Nacos中读取配置
Click to show internal directories.
Click to hide internal directories.