mirror of
https://github.com/juanfont/headscale.git
synced 2026-10-26 00:06:53 +09:00
Set online status in lite requests (#1555)
This commit is contained in:
1 parent
84fbca97f7
commit
64c0a6523f
3 files changed
+14
-15
No files matched your search
@@ -70,6 +70,16 @@ type (
|
||||
Nodes []*Node
|
||||
)
|
||||
|
||||
func (nodes Nodes) OnlineNodeMap() map[tailcfg.NodeID]bool {
|
||||
ret := make(map[tailcfg.NodeID]bool)
|
||||
|
||||
for _, node := range nodes {
|
||||
ret[tailcfg.NodeID(node.ID)] = node.IsOnline()
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
type NodeAddresses []netip.Addr
|
||||
|
||||
func (na NodeAddresses) Sort() {
|
||||
|
||||
Reference in new issue
Block a user