configcenter

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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) GetServerName

func (c *ConfigCenter) GetServerName() (string, error)

获取服务名称

func (*ConfigCenter) GetServerPort

func (c *ConfigCenter) GetServerPort() (uint64, 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 路径

Jump to

Keyboard shortcuts

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