consulinfo

package
v0.0.0-...-78b2cda Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: MIT Imports: 3 Imported by: 0

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 ConsulInfoInterface interface {
	LoadConfig()
	GetConsulToken() string
	GetServicePrefix() string
}

type NewInterface

type NewInterface interface {
	NewConsulInfo(configPath string) *ConsulInfo
}

Jump to

Keyboard shortcuts

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