Skip to main content

agents/anchor-edge-agent/internal/collector/system.go

Metadata

Indexed Symbols

  • BuildHeartbeat (line 19, go function) - Implements build heartbeat for telemetry collection.
  • pseudoUUID (line 40, go function) - Implements pseudo uuid for telemetry collection.

Markdown Headings (if applicable)

No markdown headings detected.

Source Preview

package collector

import (
"crypto/rand"
"encoding/hex"
"os"
"runtime"
"time"

"github.com/anchor-msp/anchor-edge-agent/internal/types"
)

type Config struct {
WorkspaceID string
ClientID string
AssetID string
}

func BuildHeartbeat(config Config) types.TelemetryEvent {
hostname, _ := os.Hostname()
return types.TelemetryEvent{
EventID: pseudoUUID(),
WorkspaceID: config.WorkspaceID,
ClientID: config.ClientID,
AssetID: config.AssetID,