<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>cloudflare-log-collector Go API :: cloudflare-log-collector</title><link>https://cloudflare-log-collector.munchbox.cc/godoc/index.html</link><description>Auto-generated reference documentation from the Go source code. cloudflare GraphQL API client for Cloudflare Analytics. Query builders, response parsing, retry logic.
collector Firewall event and HTTP traffic poll loops. Orchestrates Cloudflare queries and Loki shipping.
config YAML configuration loading with environment variable expansion and validation.
lifecycle Background service lifecycle manager with panic recovery and supervised restarts.
loki Loki push API client with batching, retry, and multi-tenant support.
metrics Prometheus metric definitions for poll health, firewall events, HTTP traffic, and Loki push status.</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://cloudflare-log-collector.munchbox.cc/godoc/index.xml" rel="self" type="application/rss+xml"/><item><title>cloudflare</title><link>https://cloudflare-log-collector.munchbox.cc/godoc/cloudflare/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cloudflare-log-collector.munchbox.cc/godoc/cloudflare/index.html</guid><description>import "github.com/afreidah/cloudflare-log-collector/internal/cloudflare" Index type Client func NewClient(apiToken string) *Client func NewTestClient(endpoint, apiToken string) *Client func (c *Client) QueryFirewallEvents(ctx context.Context, zoneID string, since, until time.Time) ([]FirewallEvent, error) func (c *Client) QueryHTTPRequests(ctx context.Context, zoneID string, since, until time.Time) ([]HTTPRequestGroup, error) type FirewallEvent type HTTPRequestDimensions type HTTPRequestGroup type HTTPRequestSum</description></item><item><title>collector</title><link>https://cloudflare-log-collector.munchbox.cc/godoc/collector/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cloudflare-log-collector.munchbox.cc/godoc/collector/index.html</guid><description>import "github.com/afreidah/cloudflare-log-collector/internal/collector" Index type CollectorConfig type FirewallCollector func NewFirewallCollector(cfg CollectorConfig) *FirewallCollector func (c *FirewallCollector) Run(ctx context.Context) error type HTTPCollector func NewHTTPCollector(cfg CollectorConfig) *HTTPCollector func (c *HTTPCollector) Run(ctx context.Context) error type CollectorConfig CollectorConfig holds the shared parameters for constructing a collector.</description></item><item><title>config</title><link>https://cloudflare-log-collector.munchbox.cc/godoc/config/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cloudflare-log-collector.munchbox.cc/godoc/config/index.html</guid><description>import "github.com/afreidah/cloudflare-log-collector/internal/config" Index func ParseLogLevel(s string) slog.Level type CloudflareConfig type Config func LoadConfig(path string) (*Config, error) type LoggingConfig type LokiConfig type MetricsConfig type TracingConfig type ZoneConfig func ParseLogLevel func ParseLogLevel(s string) slog.Level ParseLogLevel maps a config string to an slog.Level.</description></item><item><title>lifecycle</title><link>https://cloudflare-log-collector.munchbox.cc/godoc/lifecycle/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cloudflare-log-collector.munchbox.cc/godoc/lifecycle/index.html</guid><description>import "github.com/afreidah/cloudflare-log-collector/internal/lifecycle" Index type Manager func NewManager() *Manager func (m *Manager) Register(name string, svc Service) func (m *Manager) Run(ctx context.Context) func (m *Manager) Stop(timeout time.Duration) type Service type Stoppable type Manager Manager registers and supervises background services.</description></item><item><title>loki</title><link>https://cloudflare-log-collector.munchbox.cc/godoc/loki/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cloudflare-log-collector.munchbox.cc/godoc/loki/index.html</guid><description>import "github.com/afreidah/cloudflare-log-collector/internal/loki" Index type Client func NewClient(endpoint, tenantID string) *Client func (c *Client) Push(ctx context.Context, labels map[string]string, entries []Entry) error type Entry func NewEntry(t time.Time, line string) Entry type Client Client pushes log entries to the Loki HTTP API.</description></item><item><title>metrics</title><link>https://cloudflare-log-collector.munchbox.cc/godoc/metrics/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cloudflare-log-collector.munchbox.cc/godoc/metrics/index.html</guid><description>import "github.com/afreidah/cloudflare-log-collector/internal/metrics" Index Variables Variables BuildInfo exposes version and Go runtime metadata.
var BuildInfo = promauto.NewGaugeVec(prometheus.GaugeOpts{ Name: "cflog_build_info", Help: "Build information", }, []string{"version", "go_version"}) FirewallEventsTotal counts firewall events by action and zone.
var FirewallEventsTotal = promauto.NewCounterVec(prometheus.CounterOpts{ Name: "cflog_firewall_events_total", Help: "Cloudflare firewall events by action", }, []string{"action", "zone"}) HTTPBytes tracks byte counts by type and zone from the last poll window.</description></item><item><title>telemetry</title><link>https://cloudflare-log-collector.munchbox.cc/godoc/telemetry/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://cloudflare-log-collector.munchbox.cc/godoc/telemetry/index.html</guid><description>import "github.com/afreidah/cloudflare-log-collector/internal/telemetry" Index Constants Variables func InitTracer(ctx context.Context, cfg config.TracingConfig) (func(context.Context) error, error) func StartClientSpan(ctx context.Context, name string, attrs …attribute.KeyValue) (context.Context, trace.Span) func StartSpan(ctx context.Context, name string, attrs …attribute.KeyValue) (context.Context, trace.Span) func Tracer() trace.Tracer type TraceHandler func NewTraceHandler(inner slog.Handler) *TraceHandler func (h *TraceHandler) Enabled(ctx context.Context, level slog.Level) bool func (h *TraceHandler) Handle(ctx context.Context, r slog.Record) error func (h *TraceHandler) WithAttrs(attrs []slog.Attr) slog.Handler func (h *TraceHandler) WithGroup(name string) slog.Handler Constants</description></item></channel></rss>