config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Log *log.Options `json:"log" mapstructure:"log"`
	// 服务发现
	Server *options.ServerOptions `json:"server" mapstructure:"server"`
	// 注册中心
	Registry *options.RegistryOptions `json:"registry" mapstructure:"registry"`
}

func New

func New() *Config

func (*Config) Flags

func (c *Config) Flags() (fss cliflag.NamedFlagSets)

Flags implements app.CliOptions interface.Add flags to the specified FlagSet object.

func (*Config) Validate

func (c *Config) Validate() (errors []error)

Validate 将配置中的所有校验子逻辑 注册到当前实例的校验中

Jump to

Keyboard shortcuts

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