KVServer holds LocalStorage instance and implements consistent persistence interface.
| 111 | |
| 112 | // KVServer holds LocalStorage instance and implements consistent persistence interface. |
| 113 | type KVServer struct { |
| 114 | current proto.NodeID |
| 115 | peers *proto.Peers |
| 116 | storage *LocalStorage |
| 117 | ctx context.Context |
| 118 | cancelCtx context.CancelFunc |
| 119 | timeout time.Duration |
| 120 | wg sync.WaitGroup |
| 121 | } |
| 122 | |
| 123 | // NewKVServer returns the kv server instance. |
| 124 | func NewKVServer(currentNode proto.NodeID, peers *proto.Peers, storage *LocalStorage, timeout time.Duration) (s *KVServer) { |
nothing calls this directly
no outgoing calls
no test coverage detected