Documentation ¶
Index ¶
- Constants
- func NewFileRead() *fileRead
- type ConfigCenter
- func (c *ConfigCenter) GetCertKeyPath() (string, error)
- func (c *ConfigCenter) GetCertPemPath() (string, error)
- func (c *ConfigCenter) GetCertServerName() (string, error)
- func (c *ConfigCenter) GetServerConfigPath() (string, error)
- func (c *ConfigCenter) GetServerName() (string, error)
- func (c *ConfigCenter) GetServerPort() (uint64, error)
- func (c *ConfigCenter) MustGetCertKeyPath() string
- func (c *ConfigCenter) MustGetCertPemPath() string
- func (c *ConfigCenter) MustGetServerConfigPath() string
- type ConfigCenterV2
Constants ¶
View Source
const ( DefaultGlobalPath = "/usr/local/etc/global-conf" DefaultGlobalFileName = "/usr/local/etc/global-conf/config.json" DefaultConfigRootPath = "/usr/local/etc" DefaultCertPemPath = "certs/server.pem" DefaultCertKeyPath = "certs/server-key.pem" DefaultCertPemFileName = "server.pem" DefaultCertKeyFileName = "server-key.pem" ServerName = "server_name" ServerPort = "server_port" ConfigRootPath = "config_root_path" CertPemPath = "cert_pem_path" CertKeyPath = "cert_key_path" CertServerName = "cert_server_name" )
Variables ¶
This section is empty.
Functions ¶
func NewFileRead ¶
func NewFileRead() *fileRead
Types ¶
type ConfigCenter ¶
type ConfigCenter struct {
// contains filtered or unexported fields
}
func NewConfigCenter ¶
func NewConfigCenter(serverName string) *ConfigCenter
func (*ConfigCenter) GetCertKeyPath ¶
func (c *ConfigCenter) GetCertKeyPath() (string, error)
获取证书 .key 路径
func (*ConfigCenter) GetCertPemPath ¶
func (c *ConfigCenter) GetCertPemPath() (string, error)
获取证书 .pem 路径
func (*ConfigCenter) GetCertServerName ¶
func (c *ConfigCenter) GetCertServerName() (string, error)
获取证书服务名称
func (*ConfigCenter) GetServerConfigPath ¶
func (c *ConfigCenter) GetServerConfigPath() (string, error)
获取服务配置目录
func (*ConfigCenter) MustGetCertKeyPath ¶
func (c *ConfigCenter) MustGetCertKeyPath() string
func (*ConfigCenter) MustGetCertPemPath ¶
func (c *ConfigCenter) MustGetCertPemPath() string
func (*ConfigCenter) MustGetServerConfigPath ¶
func (c *ConfigCenter) MustGetServerConfigPath() string
type ConfigCenterV2 ¶
type ConfigCenterV2 struct {
// contains filtered or unexported fields
}
func NewConfigCenterV2 ¶
func NewConfigCenterV2(serverName string) *ConfigCenterV2
func (*ConfigCenterV2) GetCertKeyPath ¶
func (c *ConfigCenterV2) GetCertKeyPath() (string, error)
获取证书 .key 路径
func (*ConfigCenterV2) GetCertPemPath ¶
func (c *ConfigCenterV2) GetCertPemPath() (string, error)
获取证书 .pem 路径
Click to show internal directories.
Click to hide internal directories.