package
Version:
v0.0.0-...-50a54d8
Opens a new window with list of versions in this module.
Published: Jul 27, 2023
License: MIT
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
包存储提供了一个简单的分布式键值存储。
密钥和相关联的值通过分布式一致性进行更改,这意味着只有当集群中的大多数节点同意新值时,这些值才会更改。
分布式一致性是通过Raft算法提供的,特别是Hashicorp实现。
Store是一个简单的关键价值存储,所有的改变都是通过Raft协商一致来实现的。
Delete deletes the given key.
Get returns the value for the given key.
加入一个node节点, 由nodeID标识和addr地址.
节点必须准备好响应该地址的Raft通信。
打开存储。如果enableSingle被设置,并且没有现有的对等体,那么这个节点成为集群的第一个节点,并因此成为集群的领导者。
localID应该是此节点的服务器标识符。
Set sets the value for the given key.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.