The documentation you are viewing is for Dapr v1.11 which is an older version of Dapr. For up-to-date documentation, see the latest version.
Hazelcast
Detailed information on the Hazelcast state store component
创建 Dapr 组件
To setup Hazelcast state store create a component of type state.hazelcast
. 请参阅本指南,了解如何创建和应用状态存储配置。
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: <NAME>
namespace: <NAMESPACE>
spec:
type: state.hazelcast
version: v1
metadata:
- name: hazelcastServers
value: <REPLACE-WITH-HOSTS> # Required. 逗号分隔的服务器地址 Example: "hazelcast:3000,hazelcast2:3000"
- name: hazelcastMap
value: <REPLACE-WITH-MAP> # Required. Hazelcast map configuration.
Warning
以上示例将密钥明文存储, It is recommended to use a secret store for the secrets as described here.元数据字段规范
字段 | 必填 | 详情 | Example |
---|---|---|---|
hazelcastServers | Y | A comma delimited string of servers | "hazelcast:3000,hazelcast2:3000" |
hazelcastMap | Y | Hazelcast Map configuration | "foo-map" |
Setup Hazelcast
你可以使用Docker在本地运行Hazelcast:
docker run -e JAVA_OPTS="-Dhazelcast.local.publicAddress=127.0.0.1:5701" -p 5701:5701 hazelcast/hazelcast
然后你可以通过127.0.0.1:5701
与服务器交互。
在Kubernetes上安装Hazelcast的最简单方法是使用Helm chart。
相关链接
- 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.