agents/anchor-edge-agent/cmd/anchor-edge-agent/main.go
Metadata
- Purpose: Edge agent runtime code for endpoint telemetry collection and transport.
- Domain:
agents - Language:
go - Bytes: 2487
- Lines: 81
- Content hash (short):
d294a172 - Source (start): agents/anchor-edge-agent/cmd/anchor-edge-agent/main.go:1
- Source (end): agents/anchor-edge-agent/cmd/anchor-edge-agent/main.go:81
Indexed Symbols
main(line 14, go function) - Implements main for module behavior.
Markdown Headings (if applicable)
No markdown headings detected.
Source Preview
package main
import (
"flag"
"fmt"
"log"
"time"
"github.com/anchor-msp/anchor-edge-agent/internal/buffer"
"github.com/anchor-msp/anchor-edge-agent/internal/collector"
"github.com/anchor-msp/anchor-edge-agent/internal/transport"
)
func main() {
workspaceID := flag.String("workspace-id", "", "workspace UUID")
clientID := flag.String("client-id", "", "client UUID")
assetID := flag.String("asset-id", "", "asset UUID")
bufferPath := flag.String("buffer-path", "./data/events-buffer.jsonl", "path to local event buffer")
endpoint := flag.String("endpoint", "", "telemetry ingest endpoint")
collectProfile := flag.String("collect", "heartbeat,patch,backup,service", "comma-separated collection profile")
token := flag.String("token", "", "bearer token")
caFile := flag.String("ca", "", "CA certificate path")
certFile := flag.String("cert", "", "mTLS certificate path")
keyFile := flag.String("key", "", "mTLS private key path")
flushOnly := flag.Bool("flush-only", false, "only flush local buffer")