Skip to content
This repository has been archived by the owner on Aug 17, 2024. It is now read-only.

Latest commit

 

History

History
53 lines (39 loc) · 791 Bytes

README.md

File metadata and controls

53 lines (39 loc) · 791 Bytes

State Management

Dapr - State Management building block


Save State

await _daprClient.SaveStateAsync<T>(
                StateStoreName,
                key,
                value);

Read State

var value = await _daprClient.GetStateAsync<T>(
                StateStoreName,
                key);

Sample Configuration

Create statestore.yaml files in some location

Use this location as components directory in tye configuration


Redis Configuration

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: statestore
spec:
  type: state.redis
  version: v1
  metadata:
    - name: redisHost
      value: localhost:6379
    - name: redisPassword
      value: ""
    - name: actorStateStore
      value: "true"