From 47f6dbef2ad4c5b6a34ffdccd6b935cc8a9aa476 Mon Sep 17 00:00:00 2001 From: John Dietz Date: Sat, 21 Oct 2023 01:49:25 -0400 Subject: [PATCH] moving types from runtime --- go.mod | 1 - internal/telemetryShim/telemetry.go | 2 +- pkg/segment/constants.go | 16 ++++++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index fbd3151e..00b785d6 100644 --- a/go.mod +++ b/go.mod @@ -325,4 +325,3 @@ replace ( k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.24.2 ) -// replace github.com/kubefirst/runtime => /Users/dhawk/Kubefirst/runtime diff --git a/internal/telemetryShim/telemetry.go b/internal/telemetryShim/telemetry.go index 9b9a2f81..24ca3a34 100644 --- a/internal/telemetryShim/telemetry.go +++ b/internal/telemetryShim/telemetry.go @@ -11,9 +11,9 @@ import ( "time" "github.com/denisbrodbeck/machineid" + "github.com/kubefirst/kubefirst-api/pkg/segment" pkgtypes "github.com/kubefirst/kubefirst-api/pkg/types" "github.com/kubefirst/runtime/pkg" - "github.com/kubefirst/runtime/pkg/segment" "github.com/segmentio/analytics-go" log "github.com/sirupsen/logrus" ) diff --git a/pkg/segment/constants.go b/pkg/segment/constants.go index 6eaa2d35..75e4c6da 100644 --- a/pkg/segment/constants.go +++ b/pkg/segment/constants.go @@ -6,6 +6,8 @@ See the LICENSE file for more details. */ package segment +import "github.com/segmentio/analytics-go" + // SegmentIO constants // SegmentIOWriteKey The write key is the unique identifier for a source that tells Segment which source data comes // from, to which workspace the data belongs, and which destinations should receive the data. @@ -82,3 +84,17 @@ const ( MetricClusterDeleteStarted = "kubefirst.cluster_delete.started" MetricClusterDeleteCompleted = "kubefirst.cluster_delete.completed" ) + +type SegmentClient struct { + Client analytics.Client + CliVersion string + CloudProvider string + ClusterID string + ClusterType string + DomainName string + GitProvider string + InstallMethod string + KubefirstClient string + KubefirstTeam string + KubefirstTeamInfo string +}