routeinfo

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 NewInterface

type NewInterface interface {
	NewRouteInfo(configPath string) *RouteInfo
}

type RouteInfo

type RouteInfo struct {
	ConfigPath string
	Configs    struct {
		Service struct {
			Name string   `yaml:"name"`
			Ip   string   `yaml:"ip"`
			Port string   `yaml:"port"`
			Tags []string `yaml:"tags"`
		} `yaml:"service"`
	}
}
var RouteInfoPtr *RouteInfo

单例模式

func NewRouteInfo

func NewRouteInfo(configPath string) *RouteInfo

func (*RouteInfo) GetServiceIp

func (routeInfoPtr *RouteInfo) GetServiceIp() string

func (*RouteInfo) GetServiceName

func (routeInfoPtr *RouteInfo) GetServiceName() string

func (*RouteInfo) GetServicePort

func (routeInfoPtr *RouteInfo) GetServicePort() string

func (*RouteInfo) GetServiceTags

func (routeInfoPtr *RouteInfo) GetServiceTags() []string

func (*RouteInfo) LoadConfig

func (routeInfoPtr *RouteInfo) LoadConfig()

type RouteInfoInterface

type RouteInfoInterface interface {
	LoadConfig()
	GetServiceName() string
	GetServiceIp() string
	GetServicePort() string
	GetServiceTags() []string
}

Jump to

Keyboard shortcuts

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