mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-11 18:07:33 +00:00
improve testing of route failover logic
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:

committed by
Juan Font

parent
bf4fd078fc
commit
1704977e76
@@ -172,11 +172,19 @@ func (n *Notifier) String() string {
|
||||
n.l.RLock()
|
||||
defer n.l.RUnlock()
|
||||
|
||||
str := []string{"Notifier, in map:\n"}
|
||||
var b strings.Builder
|
||||
b.WriteString("chans:\n")
|
||||
|
||||
for k, v := range n.nodes {
|
||||
str = append(str, fmt.Sprintf("\t%d: %v\n", k, v))
|
||||
fmt.Fprintf(&b, "\t%d: %p\n", k, v)
|
||||
}
|
||||
|
||||
return strings.Join(str, "")
|
||||
b.WriteString("\n")
|
||||
b.WriteString("connected:\n")
|
||||
|
||||
for k, v := range n.connected {
|
||||
fmt.Fprintf(&b, "\t%d: %t\n", k, v)
|
||||
}
|
||||
|
||||
return b.String()
|
||||
}
|
||||
|
Reference in New Issue
Block a user