core

package
v0.0.0-...-c64a764 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Name    string
	Project string
	Host    string
	Port    int
)

Functions

func IsFileExist

func IsFileExist(fileName string) (error, bool)

func Scan

func Scan(host string, port int, project string, name string)

Types

type Config

type Config struct {
	Name string
}

func (*Config) LoadConfigFromYaml

func (c *Config) LoadConfigFromYaml() (err error)

读取yaml配置文件

func (*Config) UnmarshalStruct

func (c *Config) UnmarshalStruct() (err error, s Services)

将配置解析为Struct对象

func (*Config) WatchConfig

func (c *Config) WatchConfig(change chan int) (err error)

监听配置文件的修改和变动

type Service

type Service struct {
	Name    string
	Project string
	Host    string
	Port    int
}

type Services

type Services struct {
	Services []Service
}

Jump to

Keyboard shortcuts

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