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

Function deviceModelCached

hostinfo/hostinfo.go:192–204  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

190func SetDeviceModel(model string) { deviceModelAtomic.Store(model) }
191
192func deviceModelCached() string {
193 if v, _ := deviceModelAtomic.Load().(string); v != "" {
194 return v
195 }
196 if deviceModel == nil {
197 return ""
198 }
199 v := deviceModel()
200 if v != "" {
201 deviceModelAtomic.Store(v)
202 }
203 return v
204}
205
206// SetOSVersion sets the OS version.
207func SetOSVersion(v string) { osVersionAtomic.Store(v) }

Callers 1

NewFunction · 0.85

Calls 2

LoadMethod · 0.65
StoreMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…