code: func (b *FastLogStore) StoreLogs(logs []*raft.Log) error {
  	b.mu.Lock()
  	defer b.mu.Unlock()
  	if b.closed {
  		return ErrClosed
  	}
  	if b.persist {
  		var num = make([]byte, 8)
  		b.buf = b.buf[:0]
  		b.buf = append(b.buf, cmdStoreLogs)
  		binary.LittleEndian.PutUint64(num, uint64(len(logs)))
  		b.buf = append(b.buf, num...)
  		for _, log := range logs {
  			b.buf = bufferLog(b.buf, log)
  		}
  		if err := b.writeBuf(); err != nil {
  			return err
  		}
  	}
  	for _, log := range logs {
  		b.lvm[log.Index] = log
  		if b.limits {
  			if b.min == 0 {
  				b.min, b.max = log.Index, log.Index
  			} else if log.Index < b.min {
  				b.min = log.Index
  			} else if log.Index > b.max {
  				b.max = log.Index
  			}
  		}
  	}
  	return nil
  }
docs: // StoreLogs is used to store a set of raft logs