Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.1" Condition="'$(TargetFramework)' == 'net8.0'"/>
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.3" />
<PackageVersion Include="Microsoft.Extensions.Logging.ApplicationInsights" Version="2.23.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="8.0.2" />
<PackageVersion Include="Microsoft.Extensions.Options.DataAnnotations" Version="8.0.0" />
</ItemGroup>
Expand All @@ -28,8 +30,10 @@

<!-- DurableTask Packages -->
<ItemGroup>
<PackageVersion Include="Microsoft.Azure.DurableTask.AzureStorage" Version="2.3.0" />
<PackageVersion Include="Microsoft.Azure.DurableTask.Core" Version="3.3.0" />
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Extensions.DurableTask" Version="1.2.2" />
<PackageVersion Include="Microsoft.DurableTask.SqlServer" Version="1.5.1" />
</ItemGroup>

<!-- Grpc / Protobuf Packages -->
Expand Down Expand Up @@ -79,4 +83,9 @@
<PackageVersion Include="System.Collections.Immutable" Version="8.0.0" />
</ItemGroup>

<!-- External / Third-party dependencies -->
<ItemGroup>
<PackageVersion Include="CommandLineParser" Version="2.8.0" />
</ItemGroup>

</Project>
20 changes: 20 additions & 0 deletions Microsoft.DurableTask.sln
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScheduleWebApp", "samples\S
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScheduledTasks.Tests", "test\ScheduledTasks.Tests\ScheduledTasks.Tests.csproj", "{D2779F32-A548-44F8-B60A-6AC018966C79}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Services", "Services", "{A9CA1883-133C-49BE-8FA1-B6D6E27110A8}"
ProjectSection(SolutionItems) = preProject
src\Services\common.props = src\Services\common.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sidecar", "src\Services\Sidecar\Sidecar.csproj", "{47ACE256-E8C8-4734-B1D6-B9B39EBF6990}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sidecar.App", "src\Services\Sidecar.App\Sidecar.App.csproj", "{2F2A8D76-6294-420D-B308-DC2D087EE6B1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -247,6 +256,14 @@ Global
{D2779F32-A548-44F8-B60A-6AC018966C79}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D2779F32-A548-44F8-B60A-6AC018966C79}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D2779F32-A548-44F8-B60A-6AC018966C79}.Release|Any CPU.Build.0 = Release|Any CPU
{47ACE256-E8C8-4734-B1D6-B9B39EBF6990}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{47ACE256-E8C8-4734-B1D6-B9B39EBF6990}.Debug|Any CPU.Build.0 = Debug|Any CPU
{47ACE256-E8C8-4734-B1D6-B9B39EBF6990}.Release|Any CPU.ActiveCfg = Release|Any CPU
{47ACE256-E8C8-4734-B1D6-B9B39EBF6990}.Release|Any CPU.Build.0 = Release|Any CPU
{2F2A8D76-6294-420D-B308-DC2D087EE6B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2F2A8D76-6294-420D-B308-DC2D087EE6B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2F2A8D76-6294-420D-B308-DC2D087EE6B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2F2A8D76-6294-420D-B308-DC2D087EE6B1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -293,6 +310,9 @@ Global
{A89B766C-987F-4C9F-8937-D0AB9FE640C8} = {EFF7632B-821E-4CFC-B4A0-ED4B24296B17}
{100348B5-4D97-4A3F-B777-AB14F276F8FE} = {EFF7632B-821E-4CFC-B4A0-ED4B24296B17}
{D2779F32-A548-44F8-B60A-6AC018966C79} = {E5637F81-2FB9-4CD7-900D-455363B142A7}
{A9CA1883-133C-49BE-8FA1-B6D6E27110A8} = {8AFC9781-F6F1-4696-BB4A-9ED7CA9D612B}
{47ACE256-E8C8-4734-B1D6-B9B39EBF6990} = {A9CA1883-133C-49BE-8FA1-B6D6E27110A8}
{2F2A8D76-6294-420D-B308-DC2D087EE6B1} = {A9CA1883-133C-49BE-8FA1-B6D6E27110A8}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {AB41CB55-35EA-4986-A522-387AB3402E71}
Expand Down
15 changes: 15 additions & 0 deletions src/Services/Sidecar.App/BackendType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

namespace Microsoft.DurableTask.Sidecar.App;

/// <summary>
/// Represents the supported Durable Task storage provider backends.
/// </summary>
enum BackendType
{
AzureStorage,
MSSQL,
Netherite,
Emulator,
}
15 changes: 15 additions & 0 deletions src/Services/Sidecar.App/IInputReader.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

namespace Microsoft.DurableTask.Sidecar.App;

/// <summary>
/// Abstraction for reading from standard input. This abstraction allows tests to mock stdin.
/// </summary>
interface IInputReader
{
/// <summary>
/// Reads a single line from standard input.
/// </summary>
Task<string?> ReadLineAsync();
}
42 changes: 42 additions & 0 deletions src/Services/Sidecar.App/Logs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using Microsoft.Extensions.Logging;

namespace Microsoft.DurableTask.Sidecar.App
{
static partial class Logs
{
[LoggerMessage(
EventId = 1,
Level = LogLevel.Information,
Message = "Initializing the Durable Task sidecar. Listen address = {address}, backend type = {backendType}.")]
public static partial void InitializingSidecar(
this ILogger logger,
string address,
string backendType);

[LoggerMessage(
EventId = 2,
Level = LogLevel.Information,
Message = "Sidecar initialized successfully in {latencyMs}ms.")]
public static partial void SidecarInitialized(
this ILogger logger,
long latencyMs);

[LoggerMessage(
EventId = 3,
Level = LogLevel.Error,
Message = "Sidecar listen port {port} is in use by another process!")]
public static partial void SidecarListenPortAlreadyInUse(
this ILogger logger,
int port);

[LoggerMessage(
EventId = 4,
Level = LogLevel.Information,
Message = "The Durable Task sidecar is shutting down.")]
public static partial void SidecarShuttingDown(this ILogger logger);
}
}

Loading
Loading