mirror of https://github.com/dapr/docs.git
Merge branch 'v1.9' into patch-2
This commit is contained in:
commit
4bc895a9bb
|
@ -62,12 +62,14 @@ namespace LockService
|
||||||
{
|
{
|
||||||
class Program
|
class Program
|
||||||
{
|
{
|
||||||
|
[Obsolete("Distributed Lock API is in Alpha, this can be removed once it is stable.")]
|
||||||
static async Task Main(string[] args)
|
static async Task Main(string[] args)
|
||||||
{
|
{
|
||||||
string DAPR_LOCK_NAME = "lockstore";
|
string DAPR_LOCK_NAME = "lockstore";
|
||||||
|
string fileName = "my_file_name";
|
||||||
var client = new DaprClientBuilder().Build();
|
var client = new DaprClientBuilder().Build();
|
||||||
|
|
||||||
using (var fileLock = await client.Lock(DAPR_LOCK_NAME, "my_file_name", "random_id_abc123", 60))
|
await using (var fileLock = await client.Lock(DAPR_LOCK_NAME, fileName, "random_id_abc123", 60))
|
||||||
{
|
{
|
||||||
if (fileLock.Success)
|
if (fileLock.Success)
|
||||||
{
|
{
|
||||||
|
@ -147,7 +149,7 @@ namespace LockService
|
||||||
var client = new DaprClientBuilder().Build();
|
var client = new DaprClientBuilder().Build();
|
||||||
|
|
||||||
var response = await client.Unlock(DAPR_LOCK_NAME, "my_file_name", "random_id_abc123"));
|
var response = await client.Unlock(DAPR_LOCK_NAME, "my_file_name", "random_id_abc123"));
|
||||||
Console.WriteLine(response.LockStatus);
|
Console.WriteLine(response.status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr
|
||||||
| clientSecret | Y | Output | The commercetools client secret for the project | `"client secret"` |
|
| clientSecret | Y | Output | The commercetools client secret for the project | `"client secret"` |
|
||||||
| scopes | Y | Output | The commercetools scopes for the project | `"manage_project:project-key"` |
|
| scopes | Y | Output | The commercetools scopes for the project | `"manage_project:project-key"` |
|
||||||
|
|
||||||
For more information see [commercetools - Creating an API Client](https://docs.commercetools.com/tutorials/getting-started#creating-an-api-client) and [commercetools - Regions](https://docs.commercetools.com/api/general-concepts#regions).
|
For more information see [commercetools - Creating an API Client](https://docs.commercetools.com/getting-started/create-api-client#create-an-api-client) and [commercetools - Regions](https://docs.commercetools.com/api/general-concepts#regions).
|
||||||
|
|
||||||
## Binding support
|
## Binding support
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue