Documentation ¶
Index ¶
- Constants
- Variables
- func LoadConfig()
- type AddressConfig
- type Admin
- type Config
- type GovernanceConfig
- type GovernanceConfigImpl
- func (g *GovernanceConfigImpl) DeleteConfig(key string) error
- func (g *GovernanceConfigImpl) DeleteConfigWithGroup(group string, key string) error
- func (g *GovernanceConfigImpl) GetConfig(key string) (string, error)
- func (g *GovernanceConfigImpl) GetConfigWithGroup(group string, key string) (string, error)
- func (g *GovernanceConfigImpl) GetList(group string) (map[string]string, error)
- func (g *GovernanceConfigImpl) Register(url *common.URL) error
- func (g *GovernanceConfigImpl) SetConfig(key string, value string) error
- func (g *GovernanceConfigImpl) SetConfigWithGroup(group string, key string, value string) error
- func (g *GovernanceConfigImpl) UnRegister(url *common.URL) error
- type NacosGovImpl
- type Prometheus
- type RuleExists
- type RuleNotFound
- type ZkGovImpl
Constants ¶
View Source
const MockProviderConf = "./conf/mock_provider.yml"
Variables ¶
View Source
var ( Governance GovernanceConfig RegistryCenter registry.Registry MetadataReportCenter report.MetadataReport DataBase *gorm.DB // for service mock )
View Source
var ( PrometheusIp string PrometheusPort string )
Functions ¶
func LoadConfig ¶
func LoadConfig()
Types ¶
type AddressConfig ¶
type AddressConfig struct { Address string `yaml:"address"` // contains filtered or unexported fields }
func (*AddressConfig) GetUrlMap ¶
func (c *AddressConfig) GetUrlMap() url.Values
type Admin ¶
type Admin struct { ConfigCenter string `yaml:"config-center"` MetadataReport AddressConfig `yaml:"metadata-report"` Registry AddressConfig `yaml:"registry"` MysqlDsn string `yaml:"mysql-dsn"` }
type Config ¶
type Config struct { Admin Admin `yaml:"admin"` Prometheus Prometheus `yaml:"prometheus"` }
type GovernanceConfig ¶
type GovernanceConfig interface { SetConfig(key string, value string) error GetConfig(key string) (string, error) DeleteConfig(key string) error SetConfigWithGroup(group string, key string, value string) error GetConfigWithGroup(group string, key string) (string, error) DeleteConfigWithGroup(group string, key string) error Register(url *common.URL) error UnRegister(url *common.URL) error GetList(group string) (map[string]string, error) }
type GovernanceConfigImpl ¶
type GovernanceConfigImpl struct {
// contains filtered or unexported fields
}
func (*GovernanceConfigImpl) DeleteConfig ¶
func (g *GovernanceConfigImpl) DeleteConfig(key string) error
func (*GovernanceConfigImpl) DeleteConfigWithGroup ¶
func (g *GovernanceConfigImpl) DeleteConfigWithGroup(group string, key string) error
func (*GovernanceConfigImpl) GetConfig ¶
func (g *GovernanceConfigImpl) GetConfig(key string) (string, error)
func (*GovernanceConfigImpl) GetConfigWithGroup ¶
func (g *GovernanceConfigImpl) GetConfigWithGroup(group string, key string) (string, error)
func (*GovernanceConfigImpl) GetList ¶
func (g *GovernanceConfigImpl) GetList(group string) (map[string]string, error)
func (*GovernanceConfigImpl) Register ¶
func (g *GovernanceConfigImpl) Register(url *common.URL) error
func (*GovernanceConfigImpl) SetConfig ¶
func (g *GovernanceConfigImpl) SetConfig(key string, value string) error
func (*GovernanceConfigImpl) SetConfigWithGroup ¶
func (g *GovernanceConfigImpl) SetConfigWithGroup(group string, key string, value string) error
func (*GovernanceConfigImpl) UnRegister ¶
func (g *GovernanceConfigImpl) UnRegister(url *common.URL) error
type NacosGovImpl ¶
type NacosGovImpl struct { GovernanceConfig // contains filtered or unexported fields }
func (*NacosGovImpl) GetConfig ¶
func (n *NacosGovImpl) GetConfig(key string) (string, error)
GetConfig transform Nacos specified 'node does not exist' err into unified admin rule error
type Prometheus ¶
type RuleExists ¶
type RuleExists struct {
// contains filtered or unexported fields
}
func (*RuleExists) Error ¶
func (exist *RuleExists) Error() string
type RuleNotFound ¶
type RuleNotFound struct {
// contains filtered or unexported fields
}
func (*RuleNotFound) Error ¶
func (notFound *RuleNotFound) Error() string
type ZkGovImpl ¶
type ZkGovImpl struct { GovernanceConfig // contains filtered or unexported fields }
Directories ¶
Path | Synopsis |
---|---|
Package mock_config is a generated GoMock package.
|
Package mock_config is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.