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

Function GoSendNoTelemetryUpdate

pkg/wcore/wcore.go:148–162  ·  view source on GitHub ↗
(telemetryEnabled bool)

Source from the content-addressed store, hash-verified

146}
147
148func GoSendNoTelemetryUpdate(telemetryEnabled bool) {
149 go func() {
150 defer func() {
151 panichandler.PanicHandler("GoSendNoTelemetryUpdate", recover())
152 }()
153 ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
154 defer cancelFn()
155 clientId := wstore.GetClientId()
156 err := wcloud.SendNoTelemetryUpdate(ctx, clientId, !telemetryEnabled)
157 if err != nil {
158 log.Printf("[error] sending no-telemetry update: %v\n", err)
159 return
160 }
161 }()
162}
163
164func InitMainServer() error {
165 ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)

Callers 1

Calls 3

PanicHandlerFunction · 0.92
GetClientIdFunction · 0.92
SendNoTelemetryUpdateFunction · 0.92

Tested by

no test coverage detected