As a golang n00b, I have a go program that reads messages into kafka, modifies them then post them to one of the http endpoints in a list.
As of now we do some really basic round robin with random
cur := rand.Int() % len(httpEndpointList)
I'd like to improve that and add weight to the endpoints based on their response time or something similar.
I've looked into libraries but all I seem to find are written to be used as middleware using http.Handle. For example see the oxy lib roundrobin
I my case I do not serve http requests per say.
Any Ideas how could I accomplish that sort of more advanced client side load balancing in my golang program ?
I'd like to avoid to use yet another haproxy or similar in my environment.