Add initial SQLite-backed state implementation

This contains the implementation of (most) container functions,
with stubs for all pod and volume functions. Presently accessed
via environment variable only for testing purposes.

Signed-off-by: Matt Heon <mheon@redhat.com>
This commit is contained in:
Matt Heon
2023-02-20 12:53:56 -05:00
parent d71c341b94
commit 1b968c6074
61 changed files with 265846 additions and 45 deletions

View File

@ -67,3 +67,10 @@ func (p *Pod) refresh() error {
// Save changes
return p.save()
}
// resetPodState resets state fields to default values.
// It is performed before a refresh and clears the state after a reboot.
// It does not save the results - assumes the database will do that for us.
func resetPodState(state *podState) {
state.CgroupPath = ""
}