Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultConfigName = "config" DefaultConfigType = "yaml" )
View Source
const DefaultRegion = "default"
View Source
const ServiceName = "resource-backend"
Variables ¶
View Source
var (
GConfig = new(Config)
)
Functions ¶
func InitGlobalConfig ¶ added in v0.4.1
func InitGlobalConfig()
func NewConsulClient ¶ added in v0.4.1
func RegisterKeyListener ¶ added in v0.4.1
func RegisterKeyListener(l KeyListener)
RegisterKeyListener use in init method don't dynamic update
Types ¶
type AuthConfig ¶
type Config ¶
type Config struct {
Instance InstanceConfig `mapstructure:"instance"`
Log LogConfig `mapstructure:"log"`
Registry Registration `mapstructure:"registry"`
Database DatabaseConfig `mapstructure:"database"`
Auth AuthConfig `mapstructure:"auth"`
Redis RedisConfig `mapstructure:"redis"`
Extra ExtraConfig `mapstructure:"extra"`
}
type DatabaseConfig ¶
type ExtraConfig ¶ added in v0.2.0
type ExtraConfig struct {
DownloadPrefixInfo map[string][]RobinServer `mapstructure:"download_prefix_info"`
DownloadEffectiveTime time.Duration `mapstructure:"download_effective_time"`
DownloadLimitCount int64 `mapstructure:"download_limit_count"`
DownloadRedirectPrefix string `mapstructure:"download_redirect_prefix"`
SqlDebugMode bool `mapstructure:"sql_debug_mode"`
CreateNewVersionWebhook string `mapstructure:"create_new_version_webhook"`
CdnPrefix string `mapstructure:"cdn_prefix"`
DistributeCdnRatio int `mapstructure:"distribute_cdn_ratio"`
DistributeCdnRegion []string `mapstructure:"distribute_cdn_region"`
Concurrency int32 `mapstructure:"concurrency"`
}
type InstanceConfig ¶ added in v0.4.1
type KeyListener ¶ added in v0.4.1
type RedisConfig ¶ added in v0.2.0
type Registration ¶ added in v0.4.0
type RobinServer ¶ added in v0.4.1
Click to show internal directories.
Click to hide internal directories.