code: func (c *ContainerInit) changeState(state State, err string, exitStatus int) {
  	if err != "" {
  		logger.Debug("changing state", "fn", "changeState", "state", state, "err", err)
  	} else if exitStatus != -1 {
  		logger.Debug("changing state", "fn", "changeState", "state", state, "exitStatus", exitStatus)
  	} else {
  		logger.Debug("changing state", "fn", "changeState", "state", state)
  	}
  
  	c.state = state
  	c.error = err
  	c.exitStatus = exitStatus
  
  	c.streamsMtx.RLock()
  	defer c.streamsMtx.RUnlock()
  	for ch := range c.streams {
  		ch <- StateChange{State: state, Error: err, ExitStatus: exitStatus}
  	}
  }
docs: // Caller must hold lock