mirror of
https://github.com/gravitl/netmaker.git
synced 2025-02-25 16:44:01 +08:00
fixing minor things for code review
This commit is contained in:
parent
e3e239ab84
commit
aa4baa5503
2 changed files with 9 additions and 4 deletions
|
@ -210,8 +210,8 @@ func initializeUUID() error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = Insert(SERVER_UUID_RECORD_KEY, string(telJSON), SERVER_UUID_TABLE_NAME)
|
||||
return err
|
||||
|
||||
return Insert(SERVER_UUID_RECORD_KEY, string(telJSON), SERVER_UUID_TABLE_NAME)
|
||||
}
|
||||
|
||||
// CloseDB - closes a database gracefully
|
||||
|
|
|
@ -12,8 +12,13 @@ import (
|
|||
"github.com/posthog/posthog-go"
|
||||
)
|
||||
|
||||
// POSTHOG_PUB_KEY - Key for sending data to PostHog
|
||||
const POSTHOG_PUB_KEY = "phc_1vEXhPOA1P7HP5jP2dVU9xDTUqXHAelmtravyZ1vvES"
|
||||
|
||||
// POSTHOG_ENDPOINT - Endpoint of PostHog server
|
||||
const POSTHOG_ENDPOINT = "https://app.posthog.com"
|
||||
|
||||
// TELEMETRY_HOURS_BETWEEN_SEND - How long to wait before sending telemetry to server (24 hours)
|
||||
const TELEMETRY_HOURS_BETWEEN_SEND = 24
|
||||
|
||||
// TelemetryCheckpoint - Checks if 24 hours has passed since telemetry was last sent. If so, sends telemetry data to posthog
|
||||
|
@ -154,7 +159,7 @@ func getDBLength(dbname string) int {
|
|||
return len(data)
|
||||
}
|
||||
|
||||
// TelemetryData - What data to send to posthog
|
||||
// telemetryData - What data to send to posthog
|
||||
type telemetryData struct {
|
||||
Nodes int
|
||||
ExtClients int
|
||||
|
@ -164,7 +169,7 @@ type telemetryData struct {
|
|||
Version string
|
||||
}
|
||||
|
||||
// ClientCount - What types of netclients we're tallying
|
||||
// clientCount - What types of netclients we're tallying
|
||||
type clientCount struct {
|
||||
MacOS int
|
||||
Windows int
|
||||
|
|
Loading…
Reference in a new issue