mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
Rename containerRuntimeInfo to containerState for clarity
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
This commit is contained in:
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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/",
|
||||
|
Reference in New Issue
Block a user