FeatureFlags: define features outside settings.Cfg (take 3) (#44443)
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend"
|
||||
"github.com/grafana/grafana-plugin-sdk-go/data"
|
||||
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
||||
)
|
||||
|
||||
var random20HzStreamRegex = regexp.MustCompile(`random-20Hz-stream(-\d+)?`)
|
||||
@@ -37,7 +38,7 @@ func (s *Service) SubscribeStream(_ context.Context, req *backend.SubscribeStrea
|
||||
}
|
||||
}
|
||||
|
||||
if s.cfg.FeatureToggles["live-pipeline"] {
|
||||
if s.features.IsEnabled(featuremgmt.FlagLivePipeline) {
|
||||
// While developing Live pipeline avoid sending initial data.
|
||||
initialData = nil
|
||||
}
|
||||
@@ -126,7 +127,7 @@ func (s *Service) runTestStream(ctx context.Context, path string, conf testStrea
|
||||
}
|
||||
|
||||
mode := data.IncludeDataOnly
|
||||
if s.cfg.FeatureToggles["live-pipeline"] {
|
||||
if s.features.IsEnabled(featuremgmt.FlagLivePipeline) {
|
||||
mode = data.IncludeAll
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user