config

package
Version: v0.0.0-...-e9dabd0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultApplication = "public"
	DefaultLabel       = "snapshot"
)

default config

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServiceName                string
	TomlTag                    string
	MaxIdle                    int
	MaxOpen                    int
	Profile                    string `json:"profile"`
	DBHost                     string `json:"db.host"`
	DBName                     string `json:"db.name"`
	DBUsername                 string `json:"db.username"`
	DBPassword                 string `json:"db.password"`
	ConfigCenterServiceHost    string `json:"configcenter-service.host"`
	AdminServiceHost           string `json:"admin-service.host"`
	AdminServiceGetServiceCard string `json:"admin-service.get-service-card"`
	UrpServiceHost             string `json:"urp-service.host"`
}

func NewConfig

func NewConfig(serviceName string) *Config

func (*Config) LoadLocalConf

func (c *Config) LoadLocalConf() *Config

func (*Config) OverrideWithRemoteConf

func (c *Config) OverrideWithRemoteConf() *Config

func (*Config) PrintAllConf

func (c *Config) PrintAllConf()

type Option

type Option func(*Config)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL