MCPcopy Create free account
hub / github.com/tailscale/tailscale / NodeView

Struct NodeView

tailcfg/tailcfg_view.go:118–124  ·  view source on GitHub ↗

NodeView provides a read-only view over Node. Its methods should only be called if `Valid()` returns true.

Source from the content-addressed store, hash-verified

116//
117// Its methods should only be called if `Valid()` returns true.
118type NodeView struct {
119 // ж is the underlying mutable value, named with a hard-to-type
120 // character that looks pointy like a pointer.
121 // It is named distinctively to make you think of how dangerous it is to escape
122 // to callers. You must not let callers be able to mutate it.
123 ж *Node
124}
125
126// Valid reports whether v's underlying value is non-nil.
127func (v NodeView) Valid() bool { return v.ж != nil }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected