config

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSource

func NewSource(reg *registryv1.Registry) (s config.Source, err error)

NewSource create a config source according to the registry info.

Types

type Config

type Config struct {
	SrvConfig          *ServiceConfig
	RegConfig          *RegistryConfig
	ConfigSource       config.Source
	EnableConfigCenter bool
}

Config contains service config. Use this as a basic config and add own fields in own app packages if needed.

func InitConfig

func InitConfig() *Config

func (*Config) Debug

func (c *Config) Debug() bool

Debug returns true if service is running in debug mode.

type RegistryConfig

type RegistryConfig struct {
	*registryv1.Registry `json:",inline"`
	FilePath             string
}

RegistryConfig contains registry config

func NewRegistryConfig

func NewRegistryConfig() *RegistryConfig

type ServiceConfig

type ServiceConfig struct {
	*configv1.Service `json:",inline"`
}

ServiceConfig contains service config

func NewServiceConfig added in v0.0.4

func NewServiceConfig() *ServiceConfig

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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