code: func (l *Ledis) IsReadOnly() bool {
  	if l.cfg.GetReadonly() {
  		return true
  	} else if l.r != nil {
  		if b, _ := l.r.CommitIDBehind(); b {
  			return true
  		}
  	}
  	return false
  }
docs: // IsReadOnly returns whether Ledis is read only or not.