Add new PubSub cfg to DSQA
At least the server address (port) needs to be exposed
This commit is contained in:
1 parent
9fc3c2618e
commit
ca73220a2e
3 files changed
+74
-3
No files matched your search
@@ -1,9 +1,10 @@
|
||||
namespace Bts.DataStreamQueryAnalyzer;
|
||||
|
||||
using Bts.PubSub;
|
||||
|
||||
using CommandLine;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
@@ -34,6 +35,9 @@ public class DataStreamQueryAnalyzerConfig {
|
||||
[Option("stream-file", HelpText = "Stream file to load")]
|
||||
public string? StreamFile { get; set; }
|
||||
|
||||
[JsonPropertyName("pubsub")]
|
||||
public PubSubConfig? PubSub { get; set; }
|
||||
|
||||
[Option(
|
||||
"config",
|
||||
MetaValue = "PATH",
|
||||
@@ -41,9 +45,17 @@ public class DataStreamQueryAnalyzerConfig {
|
||||
[JsonIgnore]
|
||||
public string? ConfigFile { get; set; }
|
||||
|
||||
public static DataStreamQueryAnalyzerConfig Default() =>
|
||||
new() {
|
||||
User = "bts",
|
||||
Sparkd = "http://localhost:8000/config",
|
||||
PubSub = PubSubConfig.Default(),
|
||||
};
|
||||
|
||||
public void MergeWith(DataStreamQueryAnalyzerConfig other) {
|
||||
User ??= other.User;
|
||||
Password ??= other.Password;
|
||||
PubSub ??= other.PubSub;
|
||||
Sparkd ??= other.Sparkd;
|
||||
StreamFile ??= other.StreamFile;
|
||||
ConfigFile ??= other.ConfigFile;
|
||||
|
||||
Reference in new issue
Block a user