MCPcopy
hub / github.com/wavetermdev/waveterm / makeClient

Function makeClient

tsunami/engine/clientimpl.go:99–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

97}
98
99func makeClient() *ClientImpl {
100 client := &ClientImpl{
101 Lock: &sync.Mutex{},
102 DoneCh: make(chan struct{}),
103 SSEChannels: make(map[string]chan ssEvent),
104 SSEChannelsLock: &sync.Mutex{},
105 OpenModals: make(map[string]*ModalState),
106 OpenModalsLock: &sync.Mutex{},
107 Secrets: make(map[string]SecretMeta),
108 SecretsLock: &sync.Mutex{},
109 UrlHandlerMux: http.NewServeMux(),
110 ServerId: uuid.New().String(),
111 RootElem: vdom.H(DefaultComponentName, nil),
112 }
113 client.Root = MakeRoot(client)
114 return client
115}
116
117func GetDefaultClient() *ClientImpl {
118 return defaultClient

Callers 1

clientimpl.goFile · 0.85

Calls 3

HFunction · 0.92
MakeRootFunction · 0.70
StringMethod · 0.45

Tested by

no test coverage detected