()
| 97 | } |
| 98 | |
| 99 | func 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 | |
| 117 | func GetDefaultClient() *ClientImpl { |
| 118 | return defaultClient |
no test coverage detected