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

Function SharedAtom

tsunami/app/defaultclient.go:92–98  ·  view source on GitHub ↗
(name string, defaultValue T)

Source from the content-addressed store, hash-verified

90}
91
92func SharedAtom[T any](name string, defaultValue T) Atom[T] {
93 fullName := "$shared." + name
94 client := engine.GetDefaultClient()
95 atom := engine.MakeAtomImpl(defaultValue, nil)
96 client.Root.RegisterAtom(fullName, atom)
97 return Atom[T]{name: fullName, client: client}
98}
99
100func convertAppMetaToEngineMeta(appMeta *AtomMeta) *engine.AtomMeta {
101 if appMeta == nil {

Callers

nothing calls this directly

Calls 3

GetDefaultClientFunction · 0.92
MakeAtomImplFunction · 0.92
RegisterAtomMethod · 0.80

Tested by

no test coverage detected