The documentation you are viewing is for Dapr v1.10 which is an older version of Dapr. For up-to-date documentation, see the latest version.
状态存储组件
为 Dapr 状态管理建立不同状态存储的指导
Dapr 与现有数据库集成,为应用程序提供CRUD操作、事务等状态管理功能。 Dapr 支持为每个应用配置多个命名的状态存储组件。
状态存储可以扩展,可以在 components-contrib repo 中找到。
Dapr 的使用 Component
文件来描述状态存储:
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: statestore
namespace: default
spec:
type: state.<DATABASE>
version: v1
metadata:
- name: <KEY>
value: <VALUE>
- name: <KEY>
value: <VALUE>
...
数据库的类型由type
字段决定,连接地址和其他元数据等放在.metadata
部分。 Even though metadata values can contain secrets in plain text, it is recommended you use a secret store.
Visit this guide on how to configure a state store component.
支持的状态存储
Visit this reference to see all of the supported state stores in Dapr.
相关主题
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.