I am looking to add failover logic for sql instances at the application layer.
I am curious if there is something that already accomplishes failover before I create a package that wraps database/sql. Something along the lines of https://github.com/benthor/clustersql but for auto failover vs load distribution.
My gut would be to dial the initial connection pool through an internal ReadWriteCloser or net.Conn that did this for you. I would avoid doing this on each sql call or in a sql wrapper.