summaryrefslogtreecommitdiff
path: root/libpod/state.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2017-11-20 14:45:01 -0500
committerGitHub <noreply@github.com>2017-11-20 14:45:01 -0500
commit6e0944f2f128534caaf884251d1e42fa4f1ba235 (patch)
tree4ecca5c1388b93de16b1dd91244ffb3488b0ddd1 /libpod/state.go
parent3e04604dc2619b1502b609083c3b6ecb0949f1d5 (diff)
parentf2894eda689a24c069b55b1e2ad3e6136836b326 (diff)
downloadpodman-6e0944f2f128534caaf884251d1e42fa4f1ba235.tar.gz
podman-6e0944f2f128534caaf884251d1e42fa4f1ba235.tar.bz2
podman-6e0944f2f128534caaf884251d1e42fa4f1ba235.zip
Merge pull request #26 from mheon/sql_state
Implementation of SQL-backed state
Diffstat (limited to 'libpod/state.go')
-rw-r--r--libpod/state.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/libpod/state.go b/libpod/state.go
index 1c21911bb..4093f14f1 100644
--- a/libpod/state.go
+++ b/libpod/state.go
@@ -2,6 +2,10 @@ package libpod
// State is a storage backend for libpod's current state
type State interface {
+ // Close performs any pre-exit cleanup (e.g. closing database
+ // connections) that may be required
+ Close() error
+
// Accepts full ID of container
Container(id string) (*Container, error)
// Accepts full or partial IDs (as long as they are unique) and names
@@ -17,6 +21,10 @@ type State interface {
// The container will only be removed from the state, not from the pod
// which the container belongs to
RemoveContainer(ctr *Container) error
+ // UpdateContainer updates a container's state from the backing store
+ UpdateContainer(ctr *Container) error
+ // SaveContainer saves a container's current state to the backing store
+ SaveContainer(ctr *Container) error
// Retrieves all containers presently in state
AllContainers() ([]*Container, error)