diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2017-11-20 14:45:01 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-20 14:45:01 -0500 |
commit | 6e0944f2f128534caaf884251d1e42fa4f1ba235 (patch) | |
tree | 4ecca5c1388b93de16b1dd91244ffb3488b0ddd1 /libpod/in_memory_state.go | |
parent | 3e04604dc2619b1502b609083c3b6ecb0949f1d5 (diff) | |
parent | f2894eda689a24c069b55b1e2ad3e6136836b326 (diff) | |
download | podman-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/in_memory_state.go')
-rw-r--r-- | libpod/in_memory_state.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libpod/in_memory_state.go b/libpod/in_memory_state.go index dd193f57b..5d03e62e6 100644 --- a/libpod/in_memory_state.go +++ b/libpod/in_memory_state.go @@ -32,6 +32,12 @@ func NewInMemoryState() (State, error) { return state, nil } +// Close the state before shutdown +// This is a no-op as we have no backing disk +func (s *InMemoryState) Close() error { + return nil +} + // Container retrieves a container from its full ID func (s *InMemoryState) Container(id string) (*Container, error) { if id == "" { @@ -147,6 +153,21 @@ func (s *InMemoryState) RemoveContainer(ctr *Container) error { return nil } +// UpdateContainer updates a container's state +// As all state is in-memory, no update will be required +// As such this is a no-op +func (s *InMemoryState) UpdateContainer(ctr *Container) error { + return nil +} + +// SaveContainer saves a container's state +// As all state is in-memory, any changes are always reflected as soon as they +// are made +// As such this is a no-op +func (s *InMemoryState) SaveContainer(ctr *Container) error { + return nil +} + // AllContainers retrieves all containers from the state func (s *InMemoryState) AllContainers() ([]*Container, error) { ctrs := make([]*Container, 0, len(s.containers)) |