golang實現一個負載均衡(隨機,輪訓)

今天用go實現一個簡單的負載均衡的算法,雖然簡單,仍是要寫一下。golang 1.首先就是服務器的信息,web package balance type Instance struct { host string port int } func NewInstance(host string, port int) *Instance { return &Instance
相關文章
相關標籤/搜索