NewLogInMemStorage is a function that creates a new in-memory store It returns a raft.LogStore and an error
(conf config.Config)
| 23 | // NewLogInMemStorage is a function that creates a new in-memory store |
| 24 | // It returns a raft.LogStore and an error |
| 25 | func NewLogInMemStorage(conf config.Config) (DataStore, error) { |
| 26 | a := &InMemStore{ |
| 27 | logs: make(map[uint64]*raft.Log), |
| 28 | kv: map[string][]byte{}, |
| 29 | kvUint: map[string]uint64{}, |
| 30 | } |
| 31 | return a, nil |
| 32 | } |
| 33 | |
| 34 | // FirstIndex is a method on InMemStore that returns the first index in the log |
| 35 | func (ds *InMemStore) FirstIndex() (uint64, error) { |
no outgoing calls