code: func (s *Server) raftApply(t structs.MessageType, msg interface{}) (interface{}, error) {
  	buf, err := structs.Encode(t, msg)
  	if err != nil {
  		return nil, fmt.Errorf("Failed to encode request: %v", err)
  	}
  
  	// Warn if the command is very large
  	if n := len(buf); n > raftWarnSize {
  		s.logger.Printf("[WARN] consul: Attempting to apply large raft entry (%d bytes)", n)
  	}
  
  	future := s.raft.Apply(buf, enqueueLimit)
  	if err := future.Error(); err != nil {
  		return nil, err
  	}
  
  	return future.Response(), nil
  }
docs: // raftApply is used to encode a message, run it through raft, and return
  // the FSM response along with any errors