Skip to content
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

feat(datastore): respect DATASTORE_EMULATOR_HOST endpoint setting #9789

Merged
merged 3 commits into from
Apr 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat(datastore): respect DATASTORE_EMULATOR_HOST setting
  • Loading branch information
xmenxk committed Apr 17, 2024
commit 94af39cb97404a34902175469c07da55bec775be
4 changes: 1 addition & 3 deletions datastore/datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ func NewClientWithDatabase(ctx context.Context, projectID, databaseID string, op
// If the emulator is available, dial it without passing any credentials.
if addr := os.Getenv("DATASTORE_EMULATOR_HOST"); addr != "" {
o = []option.ClientOption{
internaloption.WithDefaultEndpointTemplate(prodEndpointTemplate),
internaloption.WithDefaultUniverseDomain(prodUniverseDomain),
internaloption.WithDefaultMTLSEndpoint(prodMtlsAddr),
option.WithEndpoint(addr),
option.WithoutAuthentication(),
option.WithGRPCDialOption(grpc.WithInsecure()),
}
Expand Down