MCPcopy Index your code
hub / github.com/tailscale/tailscale / GetMachineStatus

Method GetMachineStatus

types/netmap/netmap.go:199–207  ·  view source on GitHub ↗

GetMachineStatus returns the MachineStatus of the local node.

()

Source from the content-addressed store, hash-verified

197
198// GetMachineStatus returns the MachineStatus of the local node.
199func (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.
210func (nm *NetworkMap) HasCap(c tailcfg.NodeCapability) bool {

Callers 4

printConciseHeaderMethod · 0.95
equalConciseHeaderMethod · 0.95
runMethod · 0.80
nextStateLockedMethod · 0.80

Calls 2

ValidMethod · 0.65
MachineAuthorizedMethod · 0.45

Tested by

no test coverage detected