-
Notifications
You must be signed in to change notification settings - Fork 0
Switch to failover_buckets from failover_regions #18
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
Switch to failover_buckets from failover_regions #18
Conversation
| key: String.t(), | ||
| region: String.t(), | ||
| failover_regions: [String.t()] | nil | ||
| failover_buckets: [[bucket: String.t(), region: String.t()]] | nil |
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.
let's define a failover_bucket as a new type
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.
maybe even types for bucket and region since we use them more than once
| failover_regions: [ | ||
| type: {:list, :string}, | ||
| failover_buckets: [ | ||
| type: {:list, :keyword_list}, |
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.
can you define a a schema for the failover buckets, so that nimble options validates it has the correct key/values?
| key: key, | ||
| failover_regions: failover_regions | ||
| } = state | ||
| failover_buckets: failover_buckets |
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.
| failover_buckets: failover_buckets | |
| failover_buckets: [_|_] = failover_buckets |
just to make sure the list isn't empty. We can get rid of the guard with this change too
Uh oh!
There was an error while loading. Please reload this page.