{"modulePath":"github.com/cloudzero/cloudzero-agent","version":"v1.2.7","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package backfiller\n\nPackage backfiller provides utilities for testing label backfiller integrations.\n\n## Types\n\n```go\ntype MockCollector struct {\n\t// contains filtered or unexported fields\n}\n```\nMockCollector captures and validates Prometheus RemoteWrite requests\n\n```go\nfunc NewMockCollector(port int, outputDir string) *MockCollector\n```\nNewMockCollector creates a new mock collector for testing\n\n```go\nfunc (mc *MockCollector) Clear()\n```\nClear clears all received data\n\n```go\nfunc (mc *MockCollector) GetNamespaceMetrics() []prompb.TimeSeries\n```\nGetNamespaceMetrics returns only the namespace-related metrics\n\n```go\nfunc (mc *MockCollector) GetReceivedData() []prompb.WriteRequest\n```\nGetReceivedData returns all received WriteRequests\n\n```go\nfunc (mc *MockCollector) SetExpectedLabels(labels map[string]string)\n```\nSetExpectedLabels sets the labels we expect to see in the metrics\n\n```go\nfunc (mc *MockCollector) Start() error\n```\nStart starts the mock collector HTTP server\n\n```go\nfunc (mc *MockCollector) Stop() error\n```\nStop stops the mock collector server\n\n```go\nfunc (mc *MockCollector) ValidateNamespaceMetrics(expectedNamespaces []string, expectedLabels []string) error\n```\nValidateNamespaceMetrics validates that expected namespace metrics were received\n\n```go\ntype ReceivedMetrics struct {\n\tTimestamp time.Time\n\tRequest   prompb.WriteRequest\n}\n```\nReceivedMetrics holds captured metrics data for verification\n\n","path":"github.com/cloudzero/cloudzero-agent/tests/backfiller","name":"backfiller","synopsis":"Package backfiller provides utilities for testing label backfiller integrations.","isRedistributable":true}
