Add Finch.start_link spec and Finch.pool_opt,pool_opts types - #382
Open
wojtekmach wants to merge 1 commit into
Open
Add Finch.start_link spec and Finch.pool_opt,pool_opts types#382wojtekmach wants to merge 1 commit into
wojtekmach wants to merge 1 commit into
Conversation
Contributor
Author
|
As an aside, and I vaguely remember this was maybe brought up already?, here's an idea:
This way, in Finch.request, And yeah, my type above could become: [{:name, Finch.name()} | Finch.request_opt()] |
[{Finch.pool_opt() | Finch.request_opt()}]That said, it's rather rare for structs to carry options so this needs consideration! |
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.
In Req I'm adding
Req.request(url, finch: opts)where opts are a combination of Finch.build, Finch.request, and Finch.start_link options, see wojtekmach/req#542 (comment).I'd like to mention pool options by name in the docs because they can't be all mixed and matched (pool options cannot be given when using a named pool).
I think this is the type of single list of options that's then distributed to the three buckets:
(I'm actually not sure if I'm gonna use above type in my docs because it's pretty complicated and so not sure if that useful.)