refactor: Add formal config classes for prepublish streams

They can be passed to command line via --config <json_file>
This commit is contained in:
John Colvin committed 2024-06-03 13:46:51 +00:00
1 parent 306c572b53
commit 7ee6933789
6 files changed
+144 -24

No files matched your search

@@ -33,8 +33,8 @@ public class DataStreamPublisherConfig {
/// <summary>
/// The tables to publish on startup. Each key/value represents a table name/query to publish.
/// </summary>
[JsonPropertyName("prepublish_tables")]
public Dictionary<string, string>? PrepublishTables { get; set; }
[JsonPropertyName("publishers")]
public List<PublisherNode>? Publishers { get; set; }
[JsonPropertyName("simple_echo_client")]
[Option("simple-echo-client", HelpText = "Run a simple echo client (won't publish tables or connect to sparkd)")]
@@ -51,7 +51,7 @@ public class DataStreamPublisherConfig {
User ??= other.User;
Password ??= other.Password;
Sparkd ??= other.Sparkd;
PrepublishTables ??= other.PrepublishTables;
Publishers ??= other.Publishers;
SimpleEchoClient ??= other.SimpleEchoClient;
ConfigFile ??= other.ConfigFile;
}