mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 01:08:47 +02:00
cleanup some loadbalancer code
This commit is contained in:
@@ -31,7 +31,7 @@ func (lb *LoadBalancer) newIPHash() impl {
|
||||
return impl
|
||||
}
|
||||
|
||||
func (impl *ipHash) OnAddServer(srv *Server) {
|
||||
func (impl *ipHash) OnAddServer(srv Server) {
|
||||
impl.mu.Lock()
|
||||
defer impl.mu.Unlock()
|
||||
|
||||
@@ -48,7 +48,7 @@ func (impl *ipHash) OnAddServer(srv *Server) {
|
||||
impl.pool = append(impl.pool, srv)
|
||||
}
|
||||
|
||||
func (impl *ipHash) OnRemoveServer(srv *Server) {
|
||||
func (impl *ipHash) OnRemoveServer(srv Server) {
|
||||
impl.mu.Lock()
|
||||
defer impl.mu.Unlock()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user