MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / ConfigAtom

Function ConfigAtom

tsunami/app/defaultclient.go:74–81  ·  view source on GitHub ↗
(name string, defaultValue T, meta *AtomMeta)

Source from the content-addressed store, hash-verified

72}
73
74func ConfigAtom[T any](name string, defaultValue T, meta *AtomMeta) Atom[T] {
75 fullName := "$config." + name
76 client := engine.GetDefaultClient()
77 engineMeta := convertAppMetaToEngineMeta(meta)
78 atom := engine.MakeAtomImpl(defaultValue, engineMeta)
79 client.Root.RegisterAtom(fullName, atom)
80 return Atom[T]{name: fullName, client: client}
81}
82
83func DataAtom[T any](name string, defaultValue T, meta *AtomMeta) Atom[T] {
84 fullName := "$data." + name

Callers 4

app.goFile · 0.92
app.goFile · 0.92
app.goFile · 0.92
app.goFile · 0.92

Calls 4

GetDefaultClientFunction · 0.92
MakeAtomImplFunction · 0.92
RegisterAtomMethod · 0.80

Tested by

no test coverage detected