mirror of
https://github.com/bolucat/Archive.git
synced 2025-12-24 13:28:37 +08:00
Update On Thu Mar 7 19:24:48 CET 2024
This commit is contained in:
@@ -1,12 +1,24 @@
|
||||
package lb
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"go.uber.org/atomic"
|
||||
)
|
||||
|
||||
// todo: move to internal/lb
|
||||
type Node struct {
|
||||
Address string
|
||||
Label string
|
||||
Address string
|
||||
Label string
|
||||
HandShakeDuration time.Duration
|
||||
}
|
||||
|
||||
func (n *Node) Clone() *Node {
|
||||
return &Node{
|
||||
Address: n.Address,
|
||||
Label: n.Label,
|
||||
HandShakeDuration: n.HandShakeDuration,
|
||||
}
|
||||
}
|
||||
|
||||
// RoundRobin is an interface for representing round-robin balancing.
|
||||
|
||||
Reference in New Issue
Block a user