Best way to do Procedural Corridor Generation?

IMO some things that need to be defined:

  • Labyrinth or maze-like? (straight with few random rooms or different paths)
  • Will the procedurally generated area be connected to two fixed locations? (entrance & exit)
  • Will it be generated on load or dynamically changed during gameplay?