Commit graph

8 commits

Author SHA1 Message Date
Augusto Dwenger
771ce66ce2 Add mechanism to return a copy of the original slice
This is to prevent further data races.
2020-11-11 16:21:15 +01:00
Augusto Dwenger
c997dbaf22 Fix inMemDB data races
All calls to the inMemDB are now synced.
2020-11-11 12:28:11 +01:00
Augusto Dwenger
6d9049820f Fix db returning not the newst stats
Getting stats for a host returned allways the oldest item.
Now inserting an item stores it at the beginning of the list ->
without changing the getting stategy it will now return the newst item.
2020-11-11 10:25:59 +01:00
Augusto Dwenger
131a71620d Fix insertion error
It woudn't use the hostname from the func params.
2020-11-10 19:07:22 +01:00
Augusto Dwenger
4eafabc465 Add more fields to the Stats struct
Add json serialization information
Add one complete data example to the db init script
2020-11-06 09:33:08 +01:00
Augusto Dwenger
6ac85cc2a8 Change testing from assertion to require
The benefit of require is that on a fail it will stop the test
execution.
2020-10-27 12:07:52 +01:00
Augusto Dwenger
44897b3b5a Implement the hosts controller
Simple interaction with the db like getting some data and inserting
new data points into it.
2020-10-18 15:38:57 +02:00
Augusto Dwenger
cc663128f4 Implement in memory db for development 2020-10-16 17:38:30 +02:00