-
Notifications
You must be signed in to change notification settings - Fork 144
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
add HOT-RELOAD feature and tests #261
Open
apavanello
wants to merge
2
commits into
Admiral-Piett:master
Choose a base branch
from
apavanello:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
Local: # Environment name that can be passed on the command line | ||
# (i.e.: ./goaws [Local | Dev] -- defaults to 'Local') | ||
Host: localhost # hostname of the goaws system (for docker-compose this is the tag name of the container) | ||
Port: 4100 # port to listen on. | ||
Region: us-east-1 | ||
AccountId: "100010001000" | ||
LogMessages: true # Log messages (true/false) | ||
LogFile: ./goaws_messages.log # Log filename (for message logging | ||
QueueAttributeDefaults: # default attributes for all queues | ||
VisibilityTimeout: 10 # message visibility timeout | ||
ReceiveMessageWaitTimeSeconds: 10 # receive message max wait time | ||
MaximumMessageSize: 1024 # maximum message size (bytes) | ||
Queues: # List of queues to create at startup | ||
- Name: local-queue1 # Queue name | ||
- Name: local-queue2 # Queue name | ||
ReceiveMessageWaitTimeSeconds: 20 # Queue receive message max wait time | ||
MaximumMessageSize: 128 # Queue maximum message size (bytes) | ||
- Name: local-queue3 # Queue name | ||
RedrivePolicy: '{"maxReceiveCount": 100, "deadLetterTargetArn":"arn:aws:sqs:us-east-1:000000000000:local-queue3-dlq"}' | ||
- Name: local-queue3-dlq # Queue name | ||
- Name: local-queue6 # Queue name | ||
Topics: # List of topic to create at startup | ||
- Name: local-topic1 # Topic name - with some Subscriptions | ||
Subscriptions: # List of Subscriptions to create for this topic (queues will be created as required) | ||
- QueueName: local-queue4 # Queue name | ||
Raw: false # Raw message delivery (true/false) | ||
- QueueName: local-queue5 # Queue name | ||
Raw: true # Raw message delivery (true/false) | ||
FilterPolicy: '{"foo":["bar"]}' # Subscription's FilterPolicy, json like a string | ||
- Name: local-topic2 # Topic name - no Subscriptions | ||
- Name: local-topic3 # Topic name - no Subscriptions | ||
Subscriptions: # List of Subscriptions to create for this topic (queues will be created as required) | ||
- QueueName: local-queue7 # Queue name | ||
Raw: false | ||
|
||
NoQueuesOrTopics: # Another environment | ||
Host: localhost | ||
Port: 4100 | ||
LogMessages: true | ||
LogFile: ./goaws_messages.log | ||
Region: eu-west-1 | ||
|
||
NoQueueAttributeDefaults: | ||
Host: localhost | ||
Port: 4100 | ||
LogMessages: true | ||
LogFile: ./goaws_messages.log | ||
Region: eu-west-1 | ||
Queues: | ||
- Name: local-queue1 | ||
- Name: local-queue2 | ||
ReceiveMessageWaitTimeSeconds: 20 |
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After looking at this a bit deeper, I don't think I fully understand this block. Is it because in your environment - this "remove" event is what happens on a file change (in a "remove" then "recreate" pattern)? If so, the file name isn't changing is it? Could we not just do the wait/loop to check if it's rebuilt and then proceed down with the rest of the reloading calls?
I think I'm confused about 2 things really.
StartWatcher
again, and synchronously?quit
channel? In most of these non-k8 with the remove event cases would that ever actually hang up or is that goroutine just orphaned now?