Change MemoryF to SingleHost in samples (#200)
* change MemoryF to SingleHost in samples * update Netherite version in samples Co-authored-by: Sebastian Burckhardt <sburckha@microsoft.com>
This commit is contained in:
Родитель
7350b1c120
Коммит
a292d0fddb
|
@ -8,7 +8,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Azure.DurableTask.Netherite" Version="1.1.1" />
|
||||
<PackageReference Include="Microsoft.Azure.DurableTask.Netherite" Version="1.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -16,13 +16,26 @@ var netheriteSettings = new NetheriteOrchestrationServiceSettings()
|
|||
HubName = "myhub",
|
||||
PartitionCount = 4,
|
||||
|
||||
// we explicitly specify the two required connection strings here.
|
||||
// Another option would be to use a connection name resolver when calling Validate().
|
||||
ResolvedStorageConnectionString = "UseDevelopmentStorage=true;",
|
||||
ResolvedTransportConnectionString = "SingleHost",
|
||||
StorageConnectionName = "MyStorageConnection",
|
||||
EventHubsConnectionName = "MyEventHubsConnection",
|
||||
};
|
||||
|
||||
netheriteSettings.Validate();
|
||||
netheriteSettings.Validate(connectionStringResolver);
|
||||
|
||||
// we use pseudo-connection strings here for demonstration purposes.
|
||||
// See the sample "TokenCredentialDTFX" if you want to use Azure token credentials instead.
|
||||
string connectionStringResolver(string connectionName)
|
||||
{
|
||||
switch (connectionName)
|
||||
{
|
||||
case "MyStorageConnection":
|
||||
return "UseDevelopmentStorage=true;"; // use the local storage emulater
|
||||
case "MyEventHubsConnection":
|
||||
return "SingleHost"; // run Netherite in SingleHost mode, which does not require an Azure Event Hubs namespace resource
|
||||
default:
|
||||
throw new ArgumentException("invalid connection name");
|
||||
}
|
||||
};
|
||||
|
||||
var loggerFactory = LoggerFactory.Create(builder =>
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Azure.DurableTask.Netherite.AzureFunctions" Version="1.1.1" />
|
||||
<PackageReference Include="Microsoft.Azure.DurableTask.Netherite.AzureFunctions" Version="1.2.0" />
|
||||
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask" Version="2.8.1" />
|
||||
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.1.3" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<DefaultItemExcludes>**</DefaultItemExcludes>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Azure.DurableTask.Netherite.AzureFunctions" Version="1.1.1" />
|
||||
<PackageReference Include="Microsoft.Azure.DurableTask.Netherite.AzureFunctions" Version="1.2.0" />
|
||||
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask" Version="2.7.2" />
|
||||
<PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.2.3" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"IsEncrypted": false,
|
||||
"Values": {
|
||||
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
|
||||
"EventHubsConnection": "MemoryF",
|
||||
"EventHubsConnection": "SingleHost",
|
||||
"FUNCTIONS_WORKER_RUNTIME": "python"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<DefaultItemExcludes>**</DefaultItemExcludes>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Azure.DurableTask.Netherite.AzureFunctions" Version="1.1.1" />
|
||||
<PackageReference Include="Microsoft.Azure.DurableTask.Netherite.AzureFunctions" Version="1.2.0" />
|
||||
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.DurableTask" Version="2.7.2" />
|
||||
<PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.1.3" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"IsEncrypted": false,
|
||||
"Values": {
|
||||
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
|
||||
"EventHubsConnection": "MemoryF",
|
||||
"EventHubsConnection": "SingleHost",
|
||||
"FUNCTIONS_WORKER_RUNTIME": "node"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.1.3" />
|
||||
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\DurableTask.Netherite.AzureFunctions\DurableTask.Netherite.AzureFunctions.csproj" />
|
||||
<PackageReference Include="Microsoft.Azure.DurableTask.Netherite.AzureFunctions" Version="1.2.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Update="host.json">
|
||||
|
|
|
@ -10,10 +10,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Azure.Identity" Version="1.7.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\DurableTask.Netherite\DurableTask.Netherite.csproj" />
|
||||
<PackageReference Include="Microsoft.Azure.DurableTask.Netherite" Version="1.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
Загрузка…
Ссылка в новой задаче