mirror of https://github.com/dapr/docs.git
Merge branch 'v1.7' into bindings_quickstarts
This commit is contained in:
commit
a81d797ac2
|
@ -212,7 +212,40 @@ message SubscribeConfigurationRequest {
|
|||
}
|
||||
```
|
||||
|
||||
Using this method, you can subscribe to changes in specific keys for a given configuration store. gRPC streaming varies widely based on language. [See the gRPC examples](https://grpc.io/docs/languages/) for usage.
|
||||
Using this method, you can subscribe to changes in specific keys for a given configuration store. gRPC streaming varies widely based on language - see the [gRPC examples here](https://grpc.io/docs/languages/) for usage.
|
||||
|
||||
Below are the examples in sdks:
|
||||
|
||||
{{< tabs Python>}}
|
||||
|
||||
{{% codetab %}}
|
||||
```python
|
||||
#dependencies
|
||||
import asyncio
|
||||
from dapr.clients import DaprClient
|
||||
#code
|
||||
async def executeConfiguration():
|
||||
with DaprClient() as d:
|
||||
CONFIG_STORE_NAME = 'configstore'
|
||||
key = 'orderId'
|
||||
# Subscribe to configuration by key.
|
||||
configuration = await d.subscribe_configuration(store_name=CONFIG_STORE_NAME, keys=[key], config_metadata={})
|
||||
if configuration != None:
|
||||
items = configuration.get_items()
|
||||
for item in items:
|
||||
print(f"Subscribe key={item.key} value={item.value} version={item.version}", flush=True)
|
||||
else:
|
||||
print("Nothing yet")
|
||||
asyncio.run(executeConfiguration())
|
||||
```
|
||||
|
||||
```bash
|
||||
dapr run --app-id orderprocessing --components-path components/ -- python3 OrderProcessingService.py
|
||||
```
|
||||
|
||||
{{% /codetab %}}
|
||||
|
||||
{{< /tabs >}}
|
||||
|
||||
#### Stop watching configuration items
|
||||
|
||||
|
|
|
@ -508,7 +508,7 @@ For this example, you will need:
|
|||
- [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started).
|
||||
- Java JDK 11 (or greater):
|
||||
- [Oracle JDK](https://www.oracle.com/technetwork/java/javase/downloads/index.html#JDK11), or
|
||||
- [OpenJDK](https://jdk.java.net/13/)
|
||||
- [OpenJDK](https://jdk.java.net/projects/jdk/13/)
|
||||
- [Apache Maven](https://maven.apache.org/install.html), version 3.x.
|
||||
<!-- IGNORE_LINKS -->
|
||||
- [Docker Desktop](https://www.docker.com/products/docker-desktop)
|
||||
|
|
|
@ -352,7 +352,7 @@ For this example, you will need:
|
|||
- [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started).
|
||||
- Java JDK 11 (or greater):
|
||||
- [Oracle JDK](https://www.oracle.com/technetwork/java/javase/downloads/index.html#JDK11), or
|
||||
- [OpenJDK](https://jdk.java.net/13/)
|
||||
- [OpenJDK](https://jdk.java.net/projects/jdk/13/)
|
||||
- [Apache Maven](https://maven.apache.org/install.html), version 3.x.
|
||||
<!-- IGNORE_LINKS -->
|
||||
- [Docker Desktop](https://www.docker.com/products/docker-desktop)
|
||||
|
|
|
@ -388,7 +388,7 @@ For this example, you will need:
|
|||
- [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started).
|
||||
- Java JDK 11 (or greater):
|
||||
- [Oracle JDK](https://www.oracle.com/technetwork/java/javase/downloads/index.html#JDK11), or
|
||||
- [OpenJDK](https://jdk.java.net/13/)
|
||||
- [OpenJDK](https://jdk.java.net/projects/jdk/13/)
|
||||
- [Apache Maven](https://maven.apache.org/install.html), version 3.x.
|
||||
<!-- IGNORE_LINKS -->
|
||||
- [Docker Desktop](https://www.docker.com/products/docker-desktop)
|
||||
|
|
|
@ -386,7 +386,7 @@ For this example, you will need:
|
|||
- [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started).
|
||||
- Java JDK 11 (or greater):
|
||||
- [Oracle JDK](https://www.oracle.com/technetwork/java/javase/downloads/index.html#JDK11), or
|
||||
- [OpenJDK](https://jdk.java.net/13/)
|
||||
- [OpenJDK](https://jdk.java.net/projects/jdk/13/)
|
||||
- [Apache Maven](https://maven.apache.org/install.html), version 3.x.
|
||||
<!-- IGNORE_LINKS -->
|
||||
- [Docker Desktop](https://www.docker.com/products/docker-desktop)
|
||||
|
|
|
@ -190,7 +190,7 @@ First, download the code of the stored procedures for the version of Dapr that y
|
|||
|
||||
```sh
|
||||
# Set this to the version of Dapr that you're using
|
||||
DAPR_VERSION="v1.7.0"
|
||||
DAPR_VERSION="release-{{% dapr-latest-version short="true" %}}"
|
||||
curl -LfO "https://raw.githubusercontent.com/dapr/components-contrib/${DAPR_VERSION}/state/azure/cosmosdb/storedprocedures/__daprver__.js"
|
||||
curl -LfO "https://raw.githubusercontent.com/dapr/components-contrib/${DAPR_VERSION}/state/azure/cosmosdb/storedprocedures/__dapr_v2__.js"
|
||||
```
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<p>Table captions:</p>
|
||||
<blockquote>
|
||||
<p><code>Status</code>: <a href="http://localhost:1313/operations/components/certification-lifecycle/">Component
|
||||
<p><code>Status</code>: <a href="/operations/components/certification-lifecycle/">Component
|
||||
certification</a> status</p>
|
||||
</blockquote>
|
||||
<ul>
|
||||
<li><a href="http://localhost:1313/operations/components/certification-lifecycle/#alpha">Alpha</a></li>
|
||||
<li><a href="http://localhost:1313/operations/components/certification-lifecycle/#beta">Beta</a></li>
|
||||
<li><a href="http://localhost:1313/operations/components/certification-lifecycle/#stable">Stable</a></li>
|
||||
<li><a href="/operations/components/certification-lifecycle/#alpha">Alpha</a></li>
|
||||
<li><a href="/operations/components/certification-lifecycle/#beta">Beta</a></li>
|
||||
<li><a href="/operations/components/certification-lifecycle/#stable">Stable</a></li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p><code>Since</code>: defines from which Dapr Runtime version, the component is in the current status</p>
|
||||
</blockquote>
|
||||
<blockquote>
|
||||
<p><code>Component version</code>: defines the version of the component</p>
|
||||
</blockquote>
|
||||
</blockquote>
|
||||
|
|
Loading…
Reference in New Issue