mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Remove public vars in setting package (#81018)
Removes the public variable setting.SecretKey plus some other ones. Introduces some new functions for creating setting.Cfg.
This commit is contained in:
committed by
GitHub
parent
147bf01745
commit
6768c6c059
@@ -93,12 +93,12 @@ func NewScreenshotImageServiceFromCfg(cfg *setting.Cfg, db *store.DBstore, ds da
|
||||
if cfg.UnifiedAlerting.Screenshots.Capture {
|
||||
cache = NewInmemCacheService(screenshotCacheTTL, r)
|
||||
limiter = screenshot.NewTokenRateLimiter(cfg.UnifiedAlerting.Screenshots.MaxConcurrentScreenshots)
|
||||
screenshots = screenshot.NewHeadlessScreenshotService(ds, rs, r)
|
||||
screenshots = screenshot.NewHeadlessScreenshotService(cfg, ds, rs, r)
|
||||
screenshotTimeout = cfg.UnifiedAlerting.Screenshots.CaptureTimeout
|
||||
|
||||
// Image uploading is an optional feature
|
||||
if cfg.UnifiedAlerting.Screenshots.UploadExternalImageStorage {
|
||||
m, err := imguploader.NewImageUploader()
|
||||
m, err := imguploader.NewImageUploader(cfg)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to initialize uploading screenshot service: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user