Skip to content

Commit c69f00b

Browse files
committed
Merge branch 'dev' of https://github.com/datalust/seqcli into feat/trace-support
2 parents 15aa912 + 6bde141 commit c69f00b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+605
-88
lines changed

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"sdk": {
33
"version": "8.0.100"
44
}
5-
}
5+
}

src/Roastery/Roastery.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="Serilog" Version="3.1.0-dev-02078" />
9+
<PackageReference Include="Serilog" Version="3.1.1" />
1010
</ItemGroup>
1111

1212
</Project>

src/SeqCli/Apps/Definitions/AppDefinition.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#nullable enable
16-
1715
using System.Collections.Generic;
1816
using Newtonsoft.Json;
1917

src/SeqCli/Apps/Definitions/AppMetadataReader.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
using System.Reflection;
2020
using Seq.Apps;
2121

22-
#nullable enable
23-
2422
namespace SeqCli.Apps.Definitions;
2523

2624
static class AppMetadataReader

src/SeqCli/Apps/Definitions/AppSettingDefinition.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
using Newtonsoft.Json;
1616

17-
#nullable enable
18-
1917
namespace SeqCli.Apps.Definitions;
2018

2119
// ReSharper disable all

src/SeqCli/Cli/CommandLineHost.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
using Serilog.Core;
2222
using Serilog.Events;
2323

24-
#nullable enable
25-
2624
namespace SeqCli.Cli;
2725

2826
class CommandLineHost

src/SeqCli/Cli/Commands/App/InstallCommand.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
using SeqCli.Util;
2323
using Serilog;
2424

25-
#nullable enable
26-
2725
namespace SeqCli.Cli.Commands.App;
2826

2927
[Command("app", "install", "Install an app package",

src/SeqCli/Cli/Commands/App/UpdateCommand.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
using SeqCli.Util;
2222
using Serilog;
2323

24-
#nullable enable
25-
2624
namespace SeqCli.Cli.Commands.App;
2725

2826
[Command("app", "update", "Update an installed app package",

src/SeqCli/Cli/Commands/AppInstance/CreateCommand.cs

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using SeqCli.Cli.Features;
77
using SeqCli.Config;
88
using SeqCli.Connection;
9+
using SeqCli.Signals;
910
using SeqCli.Util;
1011
using Serilog;
1112

@@ -20,9 +21,10 @@ class CreateCommand : Command
2021
readonly ConnectionFeature _connection;
2122
readonly OutputFormatFeature _output;
2223

23-
string? _title, _appId;
24+
string? _title, _appId, _streamIncomingEventsSignal;
2425
readonly Dictionary<string, string> _settings = new();
2526
readonly List<string> _overridable = new();
27+
bool _streamIncomingEvents;
2628

2729
public CreateCommand(SeqConnectionFactory connectionFactory, SeqCliConfig config)
2830
{
@@ -48,12 +50,24 @@ public CreateCommand(SeqConnectionFactory connectionFactory, SeqCliConfig config
4850
_settings.Add(name, valueText ?? "");
4951
});
5052

53+
Options.Add(
54+
"stream:",
55+
"Stream incoming events to this app instance as they're ingested; optionally accepts a signal expression limiting which events should be streamed",
56+
s =>
57+
{
58+
_streamIncomingEvents = true;
59+
60+
if (!string.IsNullOrEmpty(s))
61+
{
62+
_streamIncomingEventsSignal = s;
63+
}
64+
}
65+
);
66+
5167
Options.Add(
5268
"overridable=",
5369
"Specify setting names that may be overridden by users when invoking the app",
5470
s => _overridable.Add(s));
55-
56-
// The command doesn't yet implement "Stream incoming events".
5771

5872
_connection = Enable<ConnectionFeature>();
5973
_output = Enable(new OutputFormatFeature(config.Output));
@@ -77,6 +91,8 @@ bool ValidateSettingName(string settingName)
7791
}
7892

7993
instance.Title = _title;
94+
instance.AcceptStreamedEvents = _streamIncomingEvents;
95+
instance.StreamedSignalExpression = !string.IsNullOrWhiteSpace(_streamIncomingEventsSignal) ? SignalExpressionParser.ParseExpression(_streamIncomingEventsSignal) : null;
8096

8197
foreach (var setting in _settings)
8298
{

src/SeqCli/Cli/Commands/Bench/BenchCase.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#nullable enable
16-
1715
namespace SeqCli.Cli.Commands.Bench;
1816

1917
// ReSharper disable ClassNeverInstantiated.Global AutoPropertyCanBeMadeGetOnly.Global UnusedAutoPropertyAccessor.Global

0 commit comments

Comments
 (0)