Skip to content

Commit

Permalink
chore: add internaloption.WithDefaultEndpointTemplate (#10003)
Browse files Browse the repository at this point in the history
BEGIN_NESTED_COMMIT
fix(batch):add internaloption.WithDefaultEndpointTemplate
END_NESTED_COMMIT
BEGIN_NESTED_COMMIT
fix(bigtable):add internaloption.WithDefaultEndpointTemplate
END_NESTED_COMMIT
BEGIN_NESTED_COMMIT
fix(datacatalog):add internaloption.WithDefaultEndpointTemplate
END_NESTED_COMMIT
BEGIN_NESTED_COMMIT
fix(datastream):add internaloption.WithDefaultEndpointTemplate
END_NESTED_COMMIT
BEGIN_NESTED_COMMIT
fix(debugger):add internaloption.WithDefaultEndpointTemplate
END_NESTED_COMMIT
BEGIN_NESTED_COMMIT
fix(errorreporting):add internaloption.WithDefaultEndpointTemplate
END_NESTED_COMMIT
BEGIN_NESTED_COMMIT
fix(run):add internaloption.WithDefaultEndpointTemplate
END_NESTED_COMMIT
BEGIN_NESTED_COMMIT
fix(storage):add internaloption.WithDefaultEndpointTemplate
END_NESTED_COMMIT
BEGIN_NESTED_COMMIT
fix(vmmigration):add internaloption.WithDefaultEndpointTemplate
END_NESTED_COMMIT
  • Loading branch information
quartzmo committed Apr 19, 2024
1 parent ba31ed5 commit 3b41408
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 5 deletions.
2 changes: 2 additions & 0 deletions batch/apiv1/iam_policy_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bigtable/internal/option/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func DefaultClientOptions(endpoint, mtlsEndpoint, scope, userAgent string) ([]op
o = []option.ClientOption{option.WithGRPCConn(conn)}
} else {
o = []option.ClientOption{
internaloption.WithDefaultEndpoint(endpoint),
internaloption.WithDefaultEndpointTemplate(endpoint),
internaloption.WithDefaultMTLSEndpoint(mtlsEndpoint),
option.WithScopes(scope),
option.WithUserAgent(userAgent),
Expand Down
2 changes: 2 additions & 0 deletions datacatalog/apiv1/iam_policy_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions datastream/apiv1/iam_policy_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions debugger/apiv2/controller2_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions debugger/apiv2/debugger2_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions errorreporting/apiv1beta1/error_group_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions errorreporting/apiv1beta1/error_stats_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions errorreporting/apiv1beta1/report_errors_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions run/apiv2/locations_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions storage/http_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ func newHTTPStorageClient(ctx context.Context, opts ...storageOption) (storageCl
// Append the emulator host as default endpoint for the user
o = append([]option.ClientOption{option.WithoutAuthentication()}, o...)

o = append(o, internaloption.WithDefaultEndpoint(endpoint))
o = append(o, internaloption.WithDefaultEndpointTemplate(endpoint))
o = append(o, internaloption.WithDefaultMTLSEndpoint(endpoint))
}
s.clientOption = o

// htransport selects the correct endpoint among WithEndpoint (user override), WithDefaultEndpoint, and WithDefaultMTLSEndpoint.
// htransport selects the correct endpoint among WithEndpoint (user override), WithDefaultEndpointTemplate, and WithDefaultMTLSEndpoint.
hc, ep, err := htransport.NewClient(ctx, s.clientOption...)
if err != nil {
return nil, fmt.Errorf("dialing: %w", err)
Expand Down
4 changes: 2 additions & 2 deletions storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,12 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error
opts = append([]option.ClientOption{
option.WithoutAuthentication(),
internaloption.SkipDialSettingsValidation(),
internaloption.WithDefaultEndpoint(endpoint),
internaloption.WithDefaultEndpointTemplate(endpoint),
internaloption.WithDefaultMTLSEndpoint(endpoint),
}, opts...)
}

// htransport selects the correct endpoint among WithEndpoint (user override), WithDefaultEndpoint, and WithDefaultMTLSEndpoint.
// htransport selects the correct endpoint among WithEndpoint (user override), WithDefaultEndpointTemplate, and WithDefaultMTLSEndpoint.
hc, ep, err := htransport.NewClient(ctx, opts...)
if err != nil {
return nil, fmt.Errorf("dialing: %w", err)
Expand Down
2 changes: 2 additions & 0 deletions vmmigration/apiv1/iam_policy_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3b41408

Please sign in to comment.