func ReportMetrics(clusterID string, kubeClient *kube.Client) { metrics.ID = clusterID metrics.PodID = uuid.NewWithoutDashes() metrics.Version = version.PrettyPrintVersion(version.Version) for { write := atomic.SwapInt64(&modified, 0) if write == 1 { externalMetrics(kubeClient, metrics) protolion.Info(metrics) reportSegment(metrics) } <-time.After(15 * time.Second) } }
func printVersion(w io.Writer, component string, v *protoversion.Version) { fmt.Fprintf(w, "%s\t%s\t\n", component, version.PrettyPrintVersion(v)) }