agents/anchor-edge-agent/internal/collector/system.go
Metadata
- Purpose: Edge agent runtime code for endpoint telemetry collection and transport.
- Domain:
agents - Language:
go - Bytes: 1282
- Lines: 60
- Content hash (short):
b5c95a07 - Source (start): agents/anchor-edge-agent/internal/collector/system.go:1
- Source (end): agents/anchor-edge-agent/internal/collector/system.go:60
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,