-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidate on functional options (#6)
* Consolidate on functional options This changes the signature of NewClient to only accept variadic Options, and to return an error if one occurs while setting up the client. This leaves us with the internal implementation details of the client and its options fully encapsulated by the package, which should give us substantial freedom to extend the API in future while minimising breakage for users. * Consolidate options into client * Rename Option to ClientOption * Add tests for initializing client from env Extract env variable name into internal constant --------- Co-authored-by: Mattt Zmuda <mattt@replicate.com>
- Loading branch information
1 parent
fa2c77a
commit 7c58cd1
Showing
3 changed files
with
143 additions
and
44 deletions.
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