Live: rename remote write backends to write configs (#41467)

This commit is contained in:
Alexander Emelin
2021-11-09 19:12:10 +03:00
committed by GitHub
parent e5d7be3e1c
commit e2ed140de2
10 changed files with 210 additions and 205 deletions
+16 -8
View File
@@ -103,8 +103,10 @@ func (f *DevRuleBuilder) BuildRules(_ context.Context, _ int64) ([]*LiveChannelR
DataOutputters: []DataOutputter{
NewLokiDataOutput(
os.Getenv("GF_LIVE_LOKI_ENDPOINT"),
os.Getenv("GF_LIVE_LOKI_USER"),
os.Getenv("GF_LIVE_LOKI_PASSWORD"),
&BasicAuth{
User: os.Getenv("GF_LIVE_LOKI_USER"),
Password: os.Getenv("GF_LIVE_LOKI_PASSWORD"),
},
),
},
Converter: NewJsonFrameConverter(JsonFrameConverterConfig{}),
@@ -112,8 +114,10 @@ func (f *DevRuleBuilder) BuildRules(_ context.Context, _ int64) ([]*LiveChannelR
NewManagedStreamFrameOutput(f.ManagedStream),
NewRemoteWriteFrameOutput(
os.Getenv("GF_LIVE_REMOTE_WRITE_ENDPOINT"),
os.Getenv("GF_LIVE_REMOTE_WRITE_USER"),
os.Getenv("GF_LIVE_REMOTE_WRITE_PASSWORD"),
&BasicAuth{
User: os.Getenv("GF_LIVE_REMOTE_WRITE_USER"),
Password: os.Getenv("GF_LIVE_REMOTE_WRITE_PASSWORD"),
},
1000,
),
},
@@ -298,8 +302,10 @@ func (f *DevRuleBuilder) BuildRules(_ context.Context, _ int64) ([]*LiveChannelR
NewManagedStreamFrameOutput(f.ManagedStream),
NewRemoteWriteFrameOutput(
os.Getenv("GF_LIVE_REMOTE_WRITE_ENDPOINT"),
os.Getenv("GF_LIVE_REMOTE_WRITE_USER"),
os.Getenv("GF_LIVE_REMOTE_WRITE_PASSWORD"),
&BasicAuth{
User: os.Getenv("GF_LIVE_REMOTE_WRITE_USER"),
Password: os.Getenv("GF_LIVE_REMOTE_WRITE_PASSWORD"),
},
0,
),
NewChangeLogFrameOutput(f.FrameStorage, ChangeLogOutputConfig{
@@ -333,8 +339,10 @@ func (f *DevRuleBuilder) BuildRules(_ context.Context, _ int64) ([]*LiveChannelR
NewManagedStreamFrameOutput(f.ManagedStream),
NewRemoteWriteFrameOutput(
os.Getenv("GF_LIVE_REMOTE_WRITE_ENDPOINT"),
os.Getenv("GF_LIVE_REMOTE_WRITE_USER"),
os.Getenv("GF_LIVE_REMOTE_WRITE_PASSWORD"),
&BasicAuth{
User: os.Getenv("GF_LIVE_REMOTE_WRITE_USER"),
Password: os.Getenv("GF_LIVE_REMOTE_WRITE_PASSWORD"),
},
0,
),
},