Improve server state logical handling; allow setting state directly on the environment

This commit is contained in:
Dane Everitt
2020-11-06 21:53:00 -08:00
parent 3fce1b98d5
commit 944d381778
13 changed files with 73 additions and 105 deletions

View File

@@ -48,7 +48,7 @@ type Environment struct {
emitter *events.EventBus
// Tracks the environment state.
State system.AtomicString
st system.AtomicString
}
// Creates a new base Docker environment. The ID passed through will be the ID that is used to
@@ -67,7 +67,7 @@ func New(id string, m *Metadata, c *environment.Configuration) (*Environment, er
client: cli,
}
e.State.Store(environment.ProcessOfflineState)
e.st.Store(environment.ProcessOfflineState)
return e, nil
}