Discover Packages
github.com/inelpandzic/imdgo
store
package
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: Mar 23, 2022
License: MIT
Opens a new window with license information.
Imports: 14
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
S is an in-memory key-value store, where all changes are made via Raft consensus.
New returns a new in-memory Store.
Close shuts down raft and store http server
Delete deletes the given key. If it gets called on a follower node
the request will be forwarded to the leader.
Get returns the value for the given key.
Open opens the store. If and there are no existing peers, meaning there is not a formed cluster,
then this node becomes the first node, and therefore leader, of the cluster.
Set sets the value for the given key. If it gets called on a follower node
the request will be forwarded to the leader.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.