code: func (c *cmd) createSession() (string, error) {
  	var id string
  	var err error
  	if c.conf.foreignDC {
  		id, err = c.createSessionForeign()
  	} else {
  		id, err = c.createSessionLocal()
  	}
  	if err == nil {
  		c.stopCh = make(chan struct{})
  		go c.renewSession(id, c.stopCh)
  	}
  	return id, err
  }
docs: // createSession is used to create a new session for this command