Does anyone have any experience financing earnouts 1 & 2 years post-close?

Looking to structure financing for a deal with a revenue based earnout component for the seller payable 1-year and 2-years post close. Ideally would embed earnout structure within financing at closing with earnout portion funded when needed.

Would love to chat about how people have done this type of structuring.