config

package
v0.0.0-...-cd3110a Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2022 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
y or Y : Canonical URL