-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hot config reload, part 2 + refactor backends structure #33
Merged
Conversation
This file contains 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
… the default * removed unused 'verbose' variable * guerrilla struct now holds servers as a map instead of slice * API change: guerrilla.New() now returns error * Refactor TLS config into a separate function * server's serverConfig is now kept in an atomic value, ready for hot config reload * Slightly raised the hard limit on DATA state, to avoid potential errors * Refactored allowedHosts to use a map for lookup instead of doing O(n)
* removed case statement in serve.go to make backends dynamically loaded * Structual changes so that that backends support worker pools & can re-use code. - Future groundwork for decorator pattern
* simplify (remove helper) * pass saveMailChan via function instead of embedding (simplify) going to save decorator pattern for another day, needs more thinking
- emit config change events on config file changes when SIGHUP gets caught - config tests, including events and sample config
flashmob
changed the title
Hot config reload, part 2
Hot config reload, part 2 + refactor backends structure
Jan 6, 2017
…ts yet) - fix server would hang on Accept error
* Start() and New() return the new Errors type * Behavior change of serve: does not exit if servers could not be started * Tests for server_change:start_server fired when server was enabled after reloading config - TestServerStartEvent
* Backend proxy: added states & shutdown is protected by mutex * Behaviour change: sigHandler will return rather than exit on kill / sigterm signals * Backend errors: revert to return error as error rather than custom type...
…ill keep their own table in a map, which may be customized in the future. - "allowed hosts" now supports config reload event, will reload for all servers when SIGHUP is caught.
Tightened up locking to the active clients map and eliminated some statements
…Guerrilla interface. This should make the event bus easy to swap out should it be changed to a different implementation. Users of the API can also have easier access to the server events All tests have been updated accordingly.
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.
This will fix #18
WIP