parent
4579ca4e2f
commit
c27f9e18f6
|
@ -62,6 +62,7 @@ type Configuration struct {
|
||||||
AppName string `mapstructure:"app_name,omitempty"`
|
AppName string `mapstructure:"app_name,omitempty"`
|
||||||
BackendID string `mapstructure:"backend_id,omitempty"`
|
BackendID string `mapstructure:"backend_id,omitempty"`
|
||||||
BuildEnv string `mapstructure:"build_env,omitempty"`
|
BuildEnv string `mapstructure:"build_env,omitempty"`
|
||||||
|
CacheSizes map[string]CacheSize `mapstructure:"cache_sizes,omitempty"`
|
||||||
ClusterID string `mapstructure:"cluster_id,omitempty"`
|
ClusterID string `mapstructure:"cluster_id,omitempty"`
|
||||||
Chunks map[string]Chunk `mapstructure:"chunks,omitempty"`
|
Chunks map[string]Chunk `mapstructure:"chunks,omitempty"`
|
||||||
DBMS string `mapstructure:"dbms,omitempty"`
|
DBMS string `mapstructure:"dbms,omitempty"`
|
||||||
|
@ -87,6 +88,16 @@ type Configuration struct {
|
||||||
Workers map[string]Worker `mapstructure:"workers,omitempty"`
|
Workers map[string]Worker `mapstructure:"workers,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetCacheSize returns the named cache size
|
||||||
|
func GetCacheSize(name string) int64 {
|
||||||
|
obj, ok := config.CacheSizes[name]
|
||||||
|
if ok {
|
||||||
|
return obj.Increment
|
||||||
|
}
|
||||||
|
sugar.Warnf("app.GetCacheSize: unknown cache size identifier: %s", name)
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
// GetPDFRenderEngine returns a config file parameter
|
// GetPDFRenderEngine returns a config file parameter
|
||||||
func GetPDFRenderEngine() string {
|
func GetPDFRenderEngine() string {
|
||||||
return config.PDFRenderEngine
|
return config.PDFRenderEngine
|
||||||
|
|
Loading…
Reference in New Issue