-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
profiler: use functional options instead of config object #792
Comments
It's partly because of I've come to dislike options for other reasons: they clutter the surface, they are hard to recognize as options (godoc doesn't group them together), and they have package-level names so the names have to be long enough to be unambiguous. The only real downside to a config object is that you may have to write an empty one, which is unattractive, but not otherwise harmful. I don't think a config object hinders backwards compatibility. Adding a field to a struct is backwards-compatible. |
👍 |
Note: manually updated proto file, but it yields the same result of the new disco-converter would generate. Fixes: #7345 Source-Link: googleapis/googleapis@59828ba Source-Link: googleapis/googleapis-gen@2649582 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjY0OTU4MjU3YzUzNTJkYjBiYzkxMGMwMGYxNDdiODIxYjAxMDYzNiJ9
feat: support per-entity search and autocomplete feat: support new filter syntax for recommendation feat: expose A/B experiment info in search response docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 522675951 Source-Link: googleapis/googleapis@f149e91 Source-Link: googleapis/googleapis-gen@c4538a8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzQ1MzhhODg4ZDJlYzEzY2U3MTljMWExYWE5ZGM3ZGU1YjE3Mzc1YSJ9 feat: support per-entity search and autocomplete feat: add model get API feat: support new filter syntax for recommendation feat: expose A/B experiment info in search response docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 522675546 Source-Link: googleapis/googleapis@81b0808 Source-Link: googleapis/googleapis-gen@e950439 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTk1MDQzOWNkMGQ0ODZhYjhkMmIzMjY3MmI1NGMwYTZiNjQ1MTQyMCJ9 feat: Add support for updating additional pod IPv4 ranges for Standard and Autopilot clusters Users can append more pod ranges by name to an existing cluster at the cluster level. When users or Node Auto-provisioning create new node pools, GKE will select the most available pod range and assign it to the node pool. These pod ranges can be removed once no node pool is using it. PiperOrigin-RevId: 522620935 Source-Link: googleapis/googleapis@2ddfcb8 Source-Link: googleapis/googleapis-gen@8c7eccd Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGM3ZWNjZDA5N2I3OTg5ZDcyY2FlOTU1ZmFmNWVkOGUzZmRjYmM3NSJ9 chore: disable Go compute targets (#794) Source-Link: googleapis/googleapis@cc293c6 Source-Link: googleapis/googleapis-gen@6bb5382 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmJiNTM4MmFiM2NkMzIyY2MxMjI4ZWI1ODdhZGI1ZTEyMzVjNWJkMyJ9 fix: add diregapic flag for compute (#793) Source-Link: googleapis/googleapis@f9702dc Source-Link: googleapis/googleapis-gen@2d6c055 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmQ2YzA1NWYwMTY0NmMxNjM5MTAwZDk5MjJiMjdhOTg5MGJmMmM2NiJ9 chore: add Go build targets for compute (#792) Note: manually updated proto file, but it yields the same result of the new disco-converter would generate. Fixes: #7345 Source-Link: googleapis/googleapis@59828ba Source-Link: googleapis/googleapis-gen@2649582 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjY0OTU4MjU3YzUzNTJkYjBiYzkxMGMwMGYxNDdiODIxYjAxMDYzNiJ9 chore: update gapic-generator-go version to 0.35.4 chore: add snippets to BUILD.bazel go_gapic_assembly_pkg PiperOrigin-RevId: 522373543 Source-Link: googleapis/googleapis@130f097 Source-Link: googleapis/googleapis-gen@7d1457a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2QxNDU3YWJlYzJmMGQyMDVmZGE2NzNhNGU2NTA4YjQxZGMxZTYzMSJ9 feat: Launch UploadConversation endpoint PiperOrigin-RevId: 522129764 Source-Link: googleapis/googleapis@dabc235 Source-Link: googleapis/googleapis-gen@5609ad0 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTYwOWFkMDg4Y2NmMTVhMWMyMmRmN2FhZWIzMTMzZmJlYTU2Nzk5ZSJ9 feat: add support for disabling pod IP cidr overprovision This feature requires special allowlisting for the projects. PiperOrigin-RevId: 522103451 Source-Link: googleapis/googleapis@013b597 Source-Link: googleapis/googleapis-gen@2fe6962 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmZlNjk2MmY5YzhlNzcwMzk2ZGNmYzg4ZTEwNGU1ZDcxM2MyZTY2ZSJ9 feat: added ignore_dependent_resources to DeleteCaPoolRequest, DeleteCertificateAuthorityRequest, DisableCertificateAuthorityRequest PiperOrigin-RevId: 522096199 Source-Link: googleapis/googleapis@d9592ed Source-Link: googleapis/googleapis-gen@0ab428e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGFiNDI4ZTM5MzQ5ODFkYjljOGM3YmYxN2IxZmVhNWQ3NDY4MmFmYiJ9
feat: support per-entity search and autocomplete feat: support new filter syntax for recommendation feat: expose A/B experiment info in search response docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 522675951 Source-Link: googleapis/googleapis@f149e91 Source-Link: googleapis/googleapis-gen@c4538a8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzQ1MzhhODg4ZDJlYzEzY2U3MTljMWExYWE5ZGM3ZGU1YjE3Mzc1YSJ9 feat: support per-entity search and autocomplete feat: add model get API feat: support new filter syntax for recommendation feat: expose A/B experiment info in search response docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 522675546 Source-Link: googleapis/googleapis@81b0808 Source-Link: googleapis/googleapis-gen@e950439 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTk1MDQzOWNkMGQ0ODZhYjhkMmIzMjY3MmI1NGMwYTZiNjQ1MTQyMCJ9 feat: Add support for updating additional pod IPv4 ranges for Standard and Autopilot clusters Users can append more pod ranges by name to an existing cluster at the cluster level. When users or Node Auto-provisioning create new node pools, GKE will select the most available pod range and assign it to the node pool. These pod ranges can be removed once no node pool is using it. PiperOrigin-RevId: 522620935 Source-Link: googleapis/googleapis@2ddfcb8 Source-Link: googleapis/googleapis-gen@8c7eccd Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGM3ZWNjZDA5N2I3OTg5ZDcyY2FlOTU1ZmFmNWVkOGUzZmRjYmM3NSJ9 chore: disable Go compute targets (#794) Source-Link: googleapis/googleapis@cc293c6 Source-Link: googleapis/googleapis-gen@6bb5382 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmJiNTM4MmFiM2NkMzIyY2MxMjI4ZWI1ODdhZGI1ZTEyMzVjNWJkMyJ9 fix: add diregapic flag for compute (#793) Source-Link: googleapis/googleapis@f9702dc Source-Link: googleapis/googleapis-gen@2d6c055 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmQ2YzA1NWYwMTY0NmMxNjM5MTAwZDk5MjJiMjdhOTg5MGJmMmM2NiJ9 chore: add Go build targets for compute (#792) Note: manually updated proto file, but it yields the same result of the new disco-converter would generate. Fixes: #7345 Source-Link: googleapis/googleapis@59828ba Source-Link: googleapis/googleapis-gen@2649582 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjY0OTU4MjU3YzUzNTJkYjBiYzkxMGMwMGYxNDdiODIxYjAxMDYzNiJ9 chore: update gapic-generator-go version to 0.35.4 chore: add snippets to BUILD.bazel go_gapic_assembly_pkg PiperOrigin-RevId: 522373543 Source-Link: googleapis/googleapis@130f097 Source-Link: googleapis/googleapis-gen@7d1457a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2QxNDU3YWJlYzJmMGQyMDVmZGE2NzNhNGU2NTA4YjQxZGMxZTYzMSJ9 feat: Launch UploadConversation endpoint PiperOrigin-RevId: 522129764 Source-Link: googleapis/googleapis@dabc235 Source-Link: googleapis/googleapis-gen@5609ad0 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTYwOWFkMDg4Y2NmMTVhMWMyMmRmN2FhZWIzMTMzZmJlYTU2Nzk5ZSJ9 feat: add support for disabling pod IP cidr overprovision This feature requires special allowlisting for the projects. PiperOrigin-RevId: 522103451 Source-Link: googleapis/googleapis@013b597 Source-Link: googleapis/googleapis-gen@2fe6962 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmZlNjk2MmY5YzhlNzcwMzk2ZGNmYzg4ZTEwNGU1ZDcxM2MyZTY2ZSJ9 feat: added ignore_dependent_resources to DeleteCaPoolRequest, DeleteCertificateAuthorityRequest, DisableCertificateAuthorityRequest PiperOrigin-RevId: 522096199 Source-Link: googleapis/googleapis@d9592ed Source-Link: googleapis/googleapis-gen@0ab428e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGFiNDI4ZTM5MzQ5ODFkYjljOGM3YmYxN2IxZmVhNWQ3NDY4MmFmYiJ9
feat: support per-entity search and autocomplete feat: support new filter syntax for recommendation feat: expose A/B experiment info in search response docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 522675951 Source-Link: googleapis/googleapis@f149e91 Source-Link: googleapis/googleapis-gen@c4538a8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzQ1MzhhODg4ZDJlYzEzY2U3MTljMWExYWE5ZGM3ZGU1YjE3Mzc1YSJ9 BEGIN_NESTED_COMMIT feat(retail): support per-entity search and autocomplete feat: add model get API feat: support new filter syntax for recommendation feat: expose A/B experiment info in search response docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 522675546 Source-Link: googleapis/googleapis@81b0808 Source-Link: googleapis/googleapis-gen@e950439 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTk1MDQzOWNkMGQ0ODZhYjhkMmIzMjY3MmI1NGMwYTZiNjQ1MTQyMCJ9 END_NESTED_COMMIT BEGIN_NESTED_COMMIT feat(container): Add support for updating additional pod IPv4 ranges for Standard and Autopilot clusters Users can append more pod ranges by name to an existing cluster at the cluster level. When users or Node Auto-provisioning create new node pools, GKE will select the most available pod range and assign it to the node pool. These pod ranges can be removed once no node pool is using it. PiperOrigin-RevId: 522620935 Source-Link: googleapis/googleapis@2ddfcb8 Source-Link: googleapis/googleapis-gen@8c7eccd Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGM3ZWNjZDA5N2I3OTg5ZDcyY2FlOTU1ZmFmNWVkOGUzZmRjYmM3NSJ9 END_NESTED_COMMIT BEGIN_NESTED_COMMIT chore(compute): disable Go compute targets (#794) Source-Link: googleapis/googleapis@cc293c6 Source-Link: googleapis/googleapis-gen@6bb5382 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmJiNTM4MmFiM2NkMzIyY2MxMjI4ZWI1ODdhZGI1ZTEyMzVjNWJkMyJ9 END_NESTED_COMMIT BEGIN_NESTED_COMMIT fix(compute): add diregapic flag for compute (#793) Source-Link: googleapis/googleapis@f9702dc Source-Link: googleapis/googleapis-gen@2d6c055 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmQ2YzA1NWYwMTY0NmMxNjM5MTAwZDk5MjJiMjdhOTg5MGJmMmM2NiJ9 END_NESTED_COMMIT BEGIN_NESTED_COMMIT chore(compute): add Go build targets for compute (#792) Note: manually updated proto file, but it yields the same result of the new disco-converter would generate. Fixes: #7345 Source-Link: googleapis/googleapis@59828ba Source-Link: googleapis/googleapis-gen@2649582 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjY0OTU4MjU3YzUzNTJkYjBiYzkxMGMwMGYxNDdiODIxYjAxMDYzNiJ9 END_NESTED_COMMIT BEGIN_NESTED_COMMIT chore(workflows): update gapic-generator-go version to 0.35.4 chore: add snippets to BUILD.bazel go_gapic_assembly_pkg PiperOrigin-RevId: 522373543 Source-Link: googleapis/googleapis@130f097 Source-Link: googleapis/googleapis-gen@7d1457a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2QxNDU3YWJlYzJmMGQyMDVmZGE2NzNhNGU2NTA4YjQxZGMxZTYzMSJ9 END_NESTED_COMMIT BEGIN_NESTED_COMMIT feat(contactcenterinsights): Launch UploadConversation endpoint PiperOrigin-RevId: 522129764 Source-Link: googleapis/googleapis@dabc235 Source-Link: googleapis/googleapis-gen@5609ad0 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTYwOWFkMDg4Y2NmMTVhMWMyMmRmN2FhZWIzMTMzZmJlYTU2Nzk5ZSJ9 END_NESTED_COMMIT BEGIN_NESTED_COMMIT feat(container): add support for disabling pod IP cidr overprovision This feature requires special allowlisting for the projects. PiperOrigin-RevId: 522103451 Source-Link: googleapis/googleapis@013b597 Source-Link: googleapis/googleapis-gen@2fe6962 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmZlNjk2MmY5YzhlNzcwMzk2ZGNmYzg4ZTEwNGU1ZDcxM2MyZTY2ZSJ9 END_NESTED_COMMIT BEGIN_NESTED_COMMIT feat(security/privateca): added ignore_dependent_resources to DeleteCaPoolRequest, DeleteCertificateAuthorityRequest, DisableCertificateAuthorityRequest PiperOrigin-RevId: 522096199 Source-Link: googleapis/googleapis@d9592ed Source-Link: googleapis/googleapis-gen@0ab428e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGFiNDI4ZTM5MzQ5ODFkYjljOGM3YmYxN2IxZmVhNWQ3NDY4MmFmYiJ9 END_NESTED_COMMIT
I'm not a huge fan of config objects, and functional options are used in many other places in these packages. It'd be easier to maintain backwards compatibility. There are already functional options for
ClientOption
, which could either be applied as a part of aProfilerOption
or sent through on a start func.The text was updated successfully, but these errors were encountered: