mirror of
https://github.com/tiennm99/miti99bot.git
synced 2026-09-12 06:18:27 +00:00
Implements Phases 02 (partial) and 03 of the go-port-cloud-run plan. Introduces module framework with per-module KV prefix isolation, health check endpoint, request timeout protection, and comprehensive test coverage. Cloud Run deployment deferred to Phase 01. Security hardening: constant-time secret comparison, cron auth bridge, and secrets stripped from dependency environment exports. Includes Dockerfile, GitHub CI workflow (vet + race + build), and integration tests for module lifecycle.
9 lines
276 B
Go
9 lines
276 B
Go
package server
|
|
|
|
import "time"
|
|
|
|
// defaultCronTimeout caps a single /cron/{name} invocation. Cloud Run request
|
|
// timeout is 60 minutes max, but we keep crons under our HTTP read timeout so
|
|
// runaway handlers cannot pin an instance.
|
|
const defaultCronTimeout = 5 * time.Minute
|