Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsulInfo ¶
type ConsulInfo struct { ConfigPath string Configs struct { Token string `yaml:"TOKEN"` Prefix string `yaml:"PREFIX"` } }
var ConsulInfoPtr *ConsulInfo
单例模式
func NewConsulInfo ¶
func NewConsulInfo(configPath string) *ConsulInfo
func (*ConsulInfo) GetConsulToken ¶
func (consulInfoPtr *ConsulInfo) GetConsulToken() string
func (*ConsulInfo) GetServicePrefix ¶
func (consulInfoPtr *ConsulInfo) GetServicePrefix() string
func (*ConsulInfo) LoadConfig ¶
func (consulInfoPtr *ConsulInfo) LoadConfig()
type ConsulInfoInterface ¶
type NewInterface ¶
type NewInterface interface {
NewConsulInfo(configPath string) *ConsulInfo
}
Click to show internal directories.
Click to hide internal directories.