From 49378c055ad677505a358b4e0572ec235dbde6e4 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Thu, 18 Jan 2018 11:49:14 -0500 Subject: Rename containerRuntimeInfo to containerState for clarity Signed-off-by: Matthew Heon --- libpod/container.go | 6 +++--- libpod/container_internal.go | 2 +- libpod/sql_state.go | 2 +- libpod/sql_state_internal.go | 2 +- libpod/test_common.go | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'libpod') diff --git a/libpod/container.go b/libpod/container.go index 996f79ea4..4170ea443 100644 --- a/libpod/container.go +++ b/libpod/container.go @@ -93,7 +93,7 @@ type Container struct { runningSpec *spec.Spec - state *containerRuntimeInfo + state *containerState // Locked indicates that a container has been locked as part of a // Batch() operation @@ -109,9 +109,9 @@ type Container struct { // TODO enable pod support // TODO Add readonly support -// containerRuntimeInfo contains the current state of the container +// containerState contains the current state of the container // It is stored on disk in a tmpfs and recreated on reboot -type containerRuntimeInfo struct { +type containerState struct { // The current state of the running container State ContainerStatus `json:"state"` // The path to the JSON OCI runtime spec for this container diff --git a/libpod/container_internal.go b/libpod/container_internal.go index 73f9c6961..5f43d03a7 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -141,7 +141,7 @@ func newContainer(rspec *spec.Spec, lockDir string) (*Container, error) { ctr := new(Container) ctr.config = new(ContainerConfig) - ctr.state = new(containerRuntimeInfo) + ctr.state = new(containerState) ctr.config.ID = stringid.GenerateNonCryptoID() ctr.config.Name = namesgenerator.GetRandomName(0) diff --git a/libpod/sql_state.go b/libpod/sql_state.go index 4299b29ab..42f5fe11e 100644 --- a/libpod/sql_state.go +++ b/libpod/sql_state.go @@ -527,7 +527,7 @@ func (s *SQLState) UpdateContainer(ctr *Container) error { return errors.Wrapf(err, "error parsing database state for container %s", ctr.ID()) } - newState := new(containerRuntimeInfo) + newState := new(containerState) newState.State = ContainerStatus(state) newState.ConfigPath = configPath newState.RunDir = runDir diff --git a/libpod/sql_state_internal.go b/libpod/sql_state_internal.go index 1dbc466e4..24d5d8bd4 100644 --- a/libpod/sql_state_internal.go +++ b/libpod/sql_state_internal.go @@ -467,7 +467,7 @@ func (s *SQLState) ctrFromScannable(row scannable) (*Container, error) { ctr := new(Container) ctr.config = new(ContainerConfig) - ctr.state = new(containerRuntimeInfo) + ctr.state = new(containerState) ctr.config.ID = id ctr.config.Name = name diff --git a/libpod/test_common.go b/libpod/test_common.go index 29461c12c..131a44d0f 100644 --- a/libpod/test_common.go +++ b/libpod/test_common.go @@ -47,7 +47,7 @@ func getTestContainer(id, name, locksDir string) (*Container, error) { }, }, }, - state: &containerRuntimeInfo{ + state: &containerState{ State: ContainerStateRunning, ConfigPath: "/does/not/exist/specs/" + id, RunDir: "/does/not/exist/tmp/", -- cgit v1.2.3-54-g00ecf