Live: remove feature toggle and enable by default (#33654)
This commit is contained in:
@@ -34,30 +34,16 @@ type Gateway struct {
|
||||
func (g *Gateway) Init() error {
|
||||
logger.Info("Telemetry Gateway initialization")
|
||||
|
||||
if !g.IsEnabled() {
|
||||
logger.Debug("Telemetry Gateway not enabled, skipping initialization")
|
||||
return nil
|
||||
}
|
||||
|
||||
g.converter = convert.NewConverter()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Run Gateway.
|
||||
func (g *Gateway) Run(ctx context.Context) error {
|
||||
if !g.IsEnabled() {
|
||||
logger.Debug("GrafanaLive feature not enabled, skipping initialization of Telemetry Gateway")
|
||||
return nil
|
||||
}
|
||||
<-ctx.Done()
|
||||
return ctx.Err()
|
||||
}
|
||||
|
||||
// IsEnabled returns true if the Grafana Live feature is enabled.
|
||||
func (g *Gateway) IsEnabled() bool {
|
||||
return g.Cfg.IsLiveEnabled() // turn on when Live on for now.
|
||||
}
|
||||
|
||||
func (g *Gateway) Handle(ctx *models.ReqContext) {
|
||||
streamID := ctx.Params(":streamId")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user