Repository navigation
feat!: take routing, app, cache and Redis settings from config, not the environment - #18
Merged
Merged
Conversation
This was referenced Nov 23, 2026
…he environment Core read HOST, PORT, SHUTDOWN_TIMEOUT, APP_ENV, CACHE_DRIVER and REDIS_* itself. Each now comes from a config struct the app passes in: - routing.WithConfig(config.Server): host, port, shutdown timeout, health endpoint, trusted platform, and whether failed responses show their error. Required by Run. WithHealth and WithTrustedPlatform are gone. - app.New(config.App, ...): the environment, handed to the scheduler. - cache.WithConfig(config.Cache): the driver and Redis connection. The queue and the rate limiter use the app's cache instead of their own. - app.WithRedis(config.Redis): named connections, single, sentinel or cluster. BREAKING CHANGE: app.New takes a config.App; routing, the cache and Redis need their config; the environment variables above are no longer read.
arjendevos
force-pushed
the
feat/config
branch
from
November 23, 2026 18:06
9041305 to
e7059bf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Core read
HOST,PORT,SHUTDOWN_TIMEOUT,APP_ENV,CACHE_DRIVERandREDIS_*itself. Each now comes from a config struct the app passes in:config.Serverholds host, port, shutdown timeout, health endpoint, trusted platform, and whether failed responses include their error. Required byRun;Engine()still works without it for tests.app.Newtakesconfig.Appand passes the environment to the scheduler.config.Cachepicks the driver and Redis connection. The queue and the rate limiter use the app's cache instead of building their own.config.Redisholds named connections: single, sentinel or cluster.config/env.helpers.gostill readsAPP_ENVto pick which.envfile to load, since that runs before any config exists.Breaking:
app.Newtakes aconfig.App;routing.WithHealthandWithTrustedPlatformare gone; routing, the cache and Redis need their config; the variables above are no longer read.Tested:
tests/routing,tests/app,tests/scheduling,tests/cacheandtests/rediscover each config, including what happens without one.Replaces #12, #13, #14 and #15.