Documentation
¶
Overview ¶
Package config loads gateway configuration from environment variables.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// HTTP listen address, e.g. ":8080".
Addr string
// DatabaseURL points at the SQLite file, e.g. "file:whook.db".
DatabaseURL string
// AdminToken guards every endpoint except ingest and health. Empty means
// the management API is unprotected, which is only sensible for local dev.
AdminToken string
// MaxBodyBytes is the largest inbound request body the ingest endpoint
// will accept. Larger requests are rejected with 413 and not captured.
MaxBodyBytes int64
// SecretKey encrypts provider signing secrets at rest. Required once a
// source configures a signing secret.
SecretKey string
// Delivery worker settings.
Workers int
PollInterval time.Duration
// Retention. RetentionAge is how long received events are kept; zero
// disables pruning entirely. FailedRetentionAge keeps rejected and
// dead-lettered events longer for debugging; it defaults to RetentionAge.
RetentionAge time.Duration
FailedRetentionAge time.Duration
PruneInterval time.Duration
// Ingest rate limiting, per source. IngestRate is requests per second; zero
// disables limiting. IngestBurst is the bucket size; zero defaults to one
// second of capacity.
IngestRate float64
IngestBurst int
}
Config holds all runtime settings for the gateway.
Click to show internal directories.
Click to hide internal directories.