code: func (r *raftLog) StoreLogs(logs []*raft.Log) error {
  	r.Lock()
  	tx, err := r.conn.Begin(true)
  	if err != nil {
  		r.Unlock()
  		return err
  	}
  	bucket := tx.Bucket(logsBucket)
  	for _, log := range logs {
  		var (
  			key [8]byte
  			val []byte
  		)
  		binary.BigEndian.PutUint64(key[:], log.Index)
  		val, err = r.encodeRaftLog(log)
  		if err != nil {
  			break
  		}
  		err = bucket.Put(key[:], val)
  		if err != nil {
  			break
  		}
  	}
  	if err != nil {
  		tx.Rollback()
  	} else {
  		err = tx.Commit()
  	}
  	r.Unlock()
  	return err
  }
docs: // StoreLogs implements the LogStore interface