Release v1.57.0
๐ Features
๐น Cloud SQL Datasource (GCP IAM Auth)
A new Postgres/MySQL Cloud SQL datasource that authenticates with GCP IAM database authentication on GCP and falls back to username/password locally โ selected by DB_IAM_AUTH, with no code change. It ships in its own module so core gains no GCP dependencies, and adds a pluggable AddSQLDB so other providers can be wired in the same way.
app := gofr.New()
app.AddSQLDB(cloudsql.New(app.Config)) // same line works locally and on GCP
app.Run()๐น File-Based Token Authentication for HTTP Services
HTTP services can now authenticate using a bearer token read from disk and refreshed on an interval, built for Kubernetes projected service account tokens. Configure via service.NewFileTokenAuthConfig(); it fails fast on a missing token and keeps serving the cached one if a refresh fails.
๐ง Enhancements
๐น ClickHouse Connection-Pool Configuration
clickhouse.Config now accepts pool and dial settings (MaxOpenConns, MaxIdleConns, DialTimeout, ConnMaxLifetime). Earlier, apps were stuck on the driver's default pool, so high-concurrency services could hit acquire conn timeout with no way to raise the limit. Backward-compatible โ unset fields keep the driver defaults.
app.AddClickhouse(clickhouse.New(clickhouse.Config{
Hosts: app.Config.Get("HOSTS"),
Database: app.Config.Get("DATABASE"),
MaxOpenConns: 20, // optional pool tuning; omit for driver defaults
}))๐น Datasource Latency Histogram Buckets
Datasource latency histograms capped their buckets at 10, so for datasources that record in microseconds nearly every query fell into the +Inf bucket and the histogram showed no usable distribution. Buckets now span 50ยตsโ3 minutes in each datasource's native unit. Recorded values are unchanged; only the bucket boundaries widen.
๐น gRPC Example Histogram Buckets
The gRPC examples capped buckets at 10ms, which pegged p95 latency at 10ms for normal RPCs. Buckets now scale up to 30s for accurate latency tracking.
Full Changelog: v1.56.7...v1.57.0