- Round Robin
- Weighted Round Robin
- Random
- Least Connections
weak numConns, currently only wrks for server side, thus server side db(in memory)
// helper global var
MaxConnsDB(in mem sync.Map)- numConns (atomic)
- config
- context
- handlerFunc
- server
- type
- id
- service
- state
- stateChan
- mutex
not nice: changes ->
- id, port, ctx, state, stateChan, mutex, server, serviceType
shuld be able to pass state chan to service
to be used before passing to a server()
- lb (loadbalancer)
- servers(slice of addresses)
- servers
- weights (optional)