configuration

command module
v0.0.0-...-8c7cc2d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

README

Dapr Configuration Example

Step

Prepare
  • Dapr installed
Run Get Configuration
dapr run --app-id configuration-api\
         --app-protocol grpc \
         --app-port 5005 \
         --dapr-http-port 3006 \
         --log-level debug \
         --resources-path ./config/ \
         go run ./main.go

Result

  • Configuration Client Logs

The subscription event order may out of order.

got config key = mykey, value = myConfigValue

got config key = mySubscribeKey1, value = mySubscribeValue1 
got config key = mySubscribeKey2, value = mySubscribeValue1 
got config key = mySubscribeKey3, value = mySubscribeValue1 
got config key = mySubscribeKey1, value = mySubscribeValue2 
got config key = mySubscribeKey2, value = mySubscribeValue2 
got config key = mySubscribeKey3, value = mySubscribeValue2 
got config key = mySubscribeKey1, value = mySubscribeValue3 
got config key = mySubscribeKey2, value = mySubscribeValue3 
got config key = mySubscribeKey3, value = mySubscribeValue3 
got config key = mySubscribeKey1, value = mySubscribeValue4 
got config key = mySubscribeKey2, value = mySubscribeValue4 
got config key = mySubscribeKey3, value = mySubscribeValue4 
got config key = mySubscribeKey1, value = mySubscribeValue5 
got config key = mySubscribeKey2, value = mySubscribeValue5 
got config key = mySubscribeKey3, value = mySubscribeValue5 
dapr configuration subscribe finished.
dapr configuration unsubscribed
✅  Exited App successfully

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL