Skip to content

Commit

Permalink
Update docs for configuration api (dapr#813)
Browse files Browse the repository at this point in the history
* fix docs for configuration api

Signed-off-by: Sarthak Sharma <sartsharma@microsoft.com>

* Update daprdocs/content/en/java-sdk-docs/_index.md

Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>

Signed-off-by: Sarthak Sharma <sartsharma@microsoft.com>
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
  • Loading branch information
sarsharma and mukundansundar authored Nov 25, 2022
1 parent bc9de9f commit 7593b0e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions daprdocs/content/en/java-sdk-docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,16 @@ try (DaprPreviewClient client = (new DaprClientBuilder()).buildPreviewClient())
// Get configuration for a single key
Mono<ConfigurationItem> item = client.getConfiguration(CONFIG_STORE_NAME, CONFIG_KEY).block();

// Get Configurations for multiple keys
Mono<List<ConfigurationItem>> items =
// Get configurations for multiple keys
Mono<Map<String, ConfigurationItem>> items =
client.getConfiguration(CONFIG_STORE_NAME, CONFIG_KEY_1, CONFIG_KEY_2);

// Susbcribe to Confifuration changes
Flux<List<ConfigurationItem>> outFlux = client.subscribeToConfiguration(CONFIG_STORE_NAME, CONFIG_KEY_1, CONFIG_KEY_2);
// Subscribe to configuration changes
Flux<SubscribeConfigurationResponse> outFlux = client.subscribeConfiguration(CONFIG_STORE_NAME, CONFIG_KEY_1, CONFIG_KEY_2);
outFlux.subscribe(configItems -> configItems.forEach(...));

// Unsubscribe from configuration changes
Mono<UnsubscribeConfigurationResponse> unsubscribe = client.unsubscribeConfiguration(SUBSCRIPTION_ID, CONFIG_STORE_NAME)
}
```

Expand Down

0 comments on commit 7593b0e

Please sign in to comment.