MELT butter then add heavy cream over low heat, whisk and cook until it reaches a boil.
ADD in salt, onions, garlic and 2 oz of comte-gruyere, whisking until cheese is melted.
REMOVE from heat and cover.
SPREAD mayonnaise on both sides of sourdough bread then sprinkle evenly with leftover comte-gruyere and parmesan.
TOP with sliced smoked ham then close the sandwich.
PLACE sandwich in panini press until bread is golden brown.
FRY egg until whites are just set and yolks are still runny, about 3 minutes.
TOP sandwich with sauce and sunny-side up egg and serve immediately.