GetMachineStatus returns the MachineStatus of the local node.
()
| 197 | |
| 198 | // GetMachineStatus returns the MachineStatus of the local node. |
| 199 | func (nm *NetworkMap) GetMachineStatus() tailcfg.MachineStatus { |
| 200 | if !nm.SelfNode.Valid() { |
| 201 | return tailcfg.MachineUnknown |
| 202 | } |
| 203 | if nm.SelfNode.MachineAuthorized() { |
| 204 | return tailcfg.MachineAuthorized |
| 205 | } |
| 206 | return tailcfg.MachineUnauthorized |
| 207 | } |
| 208 | |
| 209 | // HasCap reports whether nm is non-nil and nm.AllCaps contains c. |
| 210 | func (nm *NetworkMap) HasCap(c tailcfg.NodeCapability) bool { |
no test coverage detected