Skip to content

Make ClientOpts type safe#3761

Merged
jedevc merged 1 commit intomoby:masterfrom
cpuguy83:type_safe_clientopt
Mar 30, 2023
Merged

Make ClientOpts type safe#3761
jedevc merged 1 commit intomoby:masterfrom
cpuguy83:type_safe_clientopt

Conversation

@cpuguy83
Copy link
Copy Markdown
Member

This provides some compile-time safety around options passed when creating a buildkit client.
Before this change since a ClientOpt is an empty interface anything and everything could be passed in.

This is a breaking change since before consumers could pass in a raw grpc.DialOption, this now needs to be wrapped with client.WithGRPCDialOption(grpcOpt)
Consumers could also pass in something tat was not a client opt at all and it was completely ignored.

This provides some compile-time safety around options passed when
creating a buildkit client.
Before this change since a ClientOpt is an empty interface anything and
everything could be passed in.

This is a breaking change since before consumers could pass in a raw
grpc.DialOption, this now needs to be wrapped with
`client.WithGRPCDialOption(grpcOpt)`
Consumers could also pass in something tat was not a client opt at all
and it was completely ignored.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@cpuguy83 cpuguy83 requested review from jedevc and tonistiigi March 29, 2023 17:59
@jedevc jedevc merged commit 8b7bcb9 into moby:master Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants