mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Live: Update Centrifuge to the latest version (#66637)
This commit is contained in:
@@ -106,6 +106,11 @@ func ProvideService(plugCtxProvider *plugincontext.Provider, cfg *setting.Cfg, r
|
||||
LogHandler: handleLog,
|
||||
LogLevel: centrifuge.LogLevelError,
|
||||
MetricsNamespace: "grafana_live",
|
||||
// Use reasonably large expiration interval for stream meta key,
|
||||
// much bigger than maximum HistoryLifetime value in Node config.
|
||||
// This way stream meta data will expire, in some cases you may want
|
||||
// to prevent its expiration setting this to zero value.
|
||||
HistoryMetaTTL: 7 * 24 * time.Hour,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -131,14 +136,6 @@ func ProvideService(plugCtxProvider *plugincontext.Provider, cfg *setting.Cfg, r
|
||||
|
||||
broker, err := centrifuge.NewRedisBroker(node, centrifuge.RedisBrokerConfig{
|
||||
Prefix: "gf_live",
|
||||
|
||||
// Use reasonably large expiration interval for stream meta key,
|
||||
// much bigger than maximum HistoryLifetime value in Node config.
|
||||
// This way stream meta data will expire, in some cases you may want
|
||||
// to prevent its expiration setting this to zero value.
|
||||
HistoryMetaTTL: 7 * 24 * time.Hour,
|
||||
|
||||
// And configure a couple of shards to use.
|
||||
Shards: redisShards,
|
||||
})
|
||||
if err != nil {
|
||||
@@ -283,7 +280,6 @@ func ProvideService(plugCtxProvider *plugincontext.Provider, cfg *setting.Cfg, r
|
||||
|
||||
// Use a pure websocket transport.
|
||||
wsHandler := centrifuge.NewWebsocketHandler(node, centrifuge.WebsocketConfig{
|
||||
ProtocolVersion: centrifuge.ProtocolVersion2,
|
||||
ReadBufferSize: 1024,
|
||||
WriteBufferSize: 1024,
|
||||
CheckOrigin: checkOrigin,
|
||||
|
Reference in New Issue
Block a user