quickstarts/configuration/go/sdk
Paul Yuknewicz f7c925d23c
Bump to final release 1.14.0 (#1091)
* Updating CLI and runtime versions to final 1.14.0 release

Signed-off-by: Paul Yuknewicz <paulyuk@microsoft.com>

* Updating golang quickstarts with `go get -u github.com/dapr/go-sdk@v1.11.0`

Signed-off-by: Paul Yuknewicz <paulyuk@microsoft.com>

* Updating Java quickstarts to <version>1.12.0</version>

Signed-off-by: Paul Yuknewicz <paulyuk@microsoft.com>

* Fixed up go build errors with go mod tidy

Signed-off-by: Paul Yuknewicz <paulyuk@microsoft.com>

* Dapr runtime to 1.14.1

Signed-off-by: Paul Yuknewicz <paulyuk@microsoft.com>

---------

Signed-off-by: Paul Yuknewicz <paulyuk@microsoft.com>
2024-08-14 23:37:27 -07:00
..
order-processor Bump to final release 1.14.0 (#1091) 2024-08-14 23:37:27 -07:00
README.md Merging `release-1.12` into main branch (#952) 2023-10-13 16:10:27 -07:00
makefile add configuration api golang example 2022-10-26 22:37:09 +05:30

README.md

Dapr Configuration API

In this quickstart, you'll create a microservice which makes use of Dapr's Configuration API. Configuration items are key/value pairs containing configuration data such as app ids, partition keys, database names etc. The service gets configuration items from the configuration store and subscribes for configuration updates.

Visit this link for more information about Dapr and Configuration API.

This quickstart includes one service:

  • Go service order-processor

Add configuration items to the config store

Prerequisite

  • Locally running redis container - a redis container named dapr_redis is automatically created when you run dapr init
  • Open a new terminal and set values for config items orderId1 and orderId2 by using the command below
docker exec dapr_redis redis-cli MSET orderId1 "101" orderId2 "102"

Run order-processor

  1. Open a new terminal and navigate to order-processor directory.
  2. Run the service app with Dapr.
cd ./order-processor
dapr run --app-id order-processor --app-port 6001 --resources-path ../../../components -- go run .

(Optional) Update value of config items

  1. Keep the order-processor app running and open a separate terminal
  2. Change the values of orderId1 and orderId2 using the command below
  3. order-processor app gets the updated values of config items
docker exec dapr_redis redis-cli MSET orderId1 "103" orderId2 "104"